“Visual Basic Compiler has stopped working” Visual Studio Crash
I just spent days tracking this one down, so let me try to save someone else the grief.
Symptoms: My Silverlight application suddenly started doing a full compiler crashes and brings down Visual Studio crash every time I tried to compile. Cleaning the solution didn’t help. Manually cleaning solution and user files didn’t help.
The Visual Studio solution has about fifteen projects. It’s a Silverlight app with the client and server pieces in one solution. I am using mobile objects, meaning I have Silverlight libraries that contain files that were added using “Add As Link” so the same code appears in both the Silverlight and .NET assemblies. Other than these complexities, it’s not a terribly complex app.
Problem: I ultimately determined that the problem was that I moved files in the .NET project breaking the links within the Silverlight project (the .NET project holds the actual code). I replaced the links with new links to the correct files, but the old links remained. Once I drilled down to the correct directory, it was very easy to see that these files were marked as invalid. And yes, there were error messages that I didn’t see buried in the mess of other errors.
Fix: Remove the bad links.
Obviously I did a dumb thing, and obviously Visual Studio should never crash this badly no matter how badly I screw up.
I have submitted this to Microsoft, but thought I’d also get it up on the web in hopes of saving someone else some time.