Visual Studio randomly crashes when adding/removing references and projects. Any thoughts why? Will installing Sp1 help?
EDIT: I do not work with any addons except S
Beware if you suspect a corrupt .suo
file and are integrated with Source Safe.
When you restart VS after a crash, you may get the following message:
The Open from Source Control operation is still in progress but you can start working now. the rest of the projects will be retrieved asynchronously.
This basically means VS will load all projects in your opened solution from Source Safe and Overwrite any files that are checked out and contain unchecked-in changes!
After a VS crash, start Source Safe standalone and CHECK IN what you want to preserve.
Then work at fixing the corruption before starting VS again.
If .suo or .ncb file has become corrupted, that causes for visual studio crashing also. To solve this crashing you can use the following step as mentioned in the image.
I tried all of the suggested options, and a few more found at this link. No luck.
Then I tried to add a reference from a Web Site (as opposed to Web App). The process is different: you have to right click the project and go to Property Pages, and there's an Add... button on the References tab.
It still crashed, but there was a message in the Event Viewer this time that pointed me to the full path of a DLL in a 3rd party component I have installed. The DLL couldn't be read from disk (corrupt). So, a repair of that lib and a reboot later, and I'm back to good.
UPDATE:
I came to find out the real reason, several files on my SSD had become corrupt. CHKDSK /R got me back going for a while. Eventually had to replace the drive. Just a reminder that it may not be VS's fault.
I had to remove older reference for the project that no longer existed from the solution and that worked fine for me.
Try deleting your .user and .suo files - these are the user options files that VS creates. You get a .user file for each project and a .suo file for your solution. When they get corrupted, odd things happen. Deleting them will make you lose little things like which project is selected as the startup project when you start debugging, but it usually clears up odd behavior like this.
You may also want to clear out any temporary file locations, like the Temporary ASP.NET Files folders (if you're working in ASP.NET) just in case something odd is being cached somewhere.
Most commonly, if Visual Studio is crashing repeatedly, your .suo or .ncb file has become corrupted. Close your project, delete those files, and reopen. This may resolve your problem.
.suo is a hidden file.