Sometimes Visual Studio just won't cooperate, and sometimes the solution is pretty simple if obscure. I stumbled upon a great article called "The evil suo file – fighting and winning with Visual Studio" that provides some great tips for saving the day with Visual Studio is acting up. I'll summarize the points here, but the original article contains a bit more detail.
Things to Try When Visual Studio Acts Up
Try these suggestion in this order. If one doesn't help, try the next one.
- Close, reopen and try again.
- Close, delete the "suo" file, reopen and try again.
- Close, clear build refuse (delete "suo" and all obj/bin folders), reopen and try again.
- If you see messages about references, the issue could be a circular reference. Try removing the reference and then adding it back.
- If you have Add-ins, open the Add-in Manager (Tools > Add-in Manager...), and uncheck the Startup box for each of them. Close and reopen Visual Studio and see if the problem is fixed. If so, one of the Add-ins could be the issue. Try selectively turning each on until you identify the bad one.
These tips have worked will for me on many occasions. I've really included them here because I use them just infrequently enough that I forget where I saw them, but often enough that I really need to be able to find them easily. The original article explains a little more and was a very awesome thing to find, so by all means check it out!