Object reference not set to an instance of an object. (Microsoft.VisualStudio.Editor.Implementation)

SSMS 2012 11.0.3128.0

I use solutions and projects within those solutions. The one I'm currently working on has 13 projects. If I open a .sql script file from a project, close it and then try to open it again I get the above error. If I close the solution and reopen I can open the .sql file once again but only once. I am going to have to go back to using v5 as this is limiting.

I am wondering if this has anything to do with the new Tab History button. It seems quite useful except that it opens individual .sql files on startup instead of the solution/project they belong to. SSMS creates a blank/fake solution file for them all to live in. They get closed when I open my solution anyway.

I'm also having this issue, I just tracked it back to SQL Prompt 6 EAP mere moments ago. I am also using a solution, with many projects.

I have found that the tab history option appears to make a mess of things when the tabs you may have had open were a part of a solution, as it does NOT re-open the old solution, and instead adds them to the new default solution that SSMS creates. When this occurs to scripts that are in solutions/projects under source control it gets very messy - and that seems to be where the object references errors are coming from for me most of the time.

Also seeing this problem today in SSMS 2012, also with a solution with several projects. This happens for me when reopening a file within one of those projects that was modified outside of SSMS (in VS, actually)

Thanks for reporting this – I can recreate it and will look into a fix for you.

In the meantime if this is interfering with your work you can disable the tab history feature by seting the <Enabled> variable to false in
%localappdata%\\SQL Prompt 6\\RedGate_SQLPrompt_CommonUI_Options_TabMagicOptions.xml