“An IDE is either with us or against us.”

I use Visual Studio 2008 SP1 and Resharper 4.5 to develop a WPF-based ERP system. Visual Studio 2008 SP1 introduced a lot of pain. For the past half year I’ve experienced a dozen IDE crashes a day. Some hotfixes have helped, “Siverlight Tools” helped, but overall things have been rotten, and Resharper, as necessary as it is, has amplified the bugs that infest the core of Visual Studio. – Please save us MEF! –

Here are the worst of the problems, and some workarounds that have returned me to ranks of the civil-tongued.

  1. Out of Memory Exception: While developing WPF, if I made the fool-mistake of building while a XAML document was open I would receive “Unknown build error, ‘Exception of type ‘System.OutOfMemoryException’ was thrown.’ ” in the build output. No amount of “Rebuilding” or “Cleaning” would allow a build to succeed. The only fix was to shut down Visual Studio and restart it.
  2. “Microsoft Visual Studio is Busy”: Several times a day (again while developing a WPF apps) Visual Studio would show an hourglass, and the nasty tray icon “Microsoft Visual Studio is Busy” would appear. Again no cure, but to shutdown and restart Visual Studio.
  3. “Disappearing IDE”:  While coding a WPF app, I would be– typing code, typing code, typing c… Whap! No more Visual Studio. No error.  No harddrive-chatter-drama, just Poof! Gone. There was no chance to save any changes, but at least this bug did half of the task of shutting down and restarting Visual Studio for me.

The fixes:
Fix #1 : Ilya Ryzhenkov[.] and Andrey Serebryansky of JetBrains pointed me to this fix for the OOM (“Out of Memory Exception”). Details:

OutOfMemory exceptions are often caused by address space fragmentation in Visual Studio process. For users experiencing excessive OutOfMemory exceptions we provide a tool which overrides Visual Studio’s memory allocation policy to ensure more continuous address space for Common Language Runtime.

Fix #2 : VS2008 SP1 sometimes hangs irretrievably after WPF Designer.

Fix #3: Silverlight 2 Tools. This helps the random crashes when editing XAML, but alone was no match.

Bonus Fix: Steve Harman’s post on permitting Visual Studio to gobble more than 2GB RAM.

Footnote:
As part of my Visual Studio de-spaz-ificaton program I uninstalled and reinstalled Visual Studio 2008. Don’t know if this step was a necessary one, or just part of the time-honored ritual: uninstall Visual Studio, throw chicken bones, reboot, reinstall Visual Studio, mumble hexadecimal incantations, reboot.

vschickenbone

My thanks to the people that created and presented these fixes, and to the people that created the original bugs:  I guess you can cancel that restraining order.

Bryan Hunter is currently serving his 15th year in the War on Visual Studio