VS 2008 crashes on startup when ‘Code Analysis Tools’ feature

December 30, 2007 – 9:00 pm

VS 2008 crashes on startup when ‘Code Analysis Tools’ feature is not installed

Now that Visual Studio 2008 RTM is out I have started getting reports of Visual Studio crashing on startup when TestDriven.Net is installed. I was pretty dismayed as TestDriven.Net has included Orcas support since January of this year and this support has been pretty well tested. I certainly wasn’t expecting to see any fatal crashes!

needs_to_close 

It turns out that this crash only happens when the user has opted not to install the ‘Code Analysis Tools’ feature. This is quite common when someone is doing a minimal install of Visual Studio with just the language feature they need.

The issue appears to be related to the Visual Studio command bars. If you simply query for a command bar that doesn’t exist, Visual Studio will quit with an error (rather than throwing the expected ArgumentException)!

code_analysis_tools_snip

I’m happy to say there are now two possible fixes for the issue:

  1. If you go into the Visual Studio 2008 Team Suite setup and enable the ‘Code Analysis Tools’ feature, you should find the crash goes away.
  2. I’ve just released TestDriven.Net 2.10, which includes a workaround for this issue. Please read the release notes and download it from here. If you’re using Visual Studio 2008 I strongly encourage you to install this version.

Thanks to Aaron Jensen, Chad Myers and Dru Sellers for reporting the problem.

Another way of looking at this

Jamie A comments to an article on Channel Register:

Here’s a slightly less technical way of looking at the issue:

Microsoft essentially have 2 editions of a program. The first edition speaks English (User Interface) to the user, but in behind can speak French (COM) to other components.

The second edition also speaks English and French, but can also speak Russian (VSIP - Visual Studio Integration Programme).

Microsoft intends that your components speak Russian in order to extend Visual Studio. Their VSIP license agreement also states that you can only try to speak Russian to the second edition of the software. Attempting to speak Russian to the first edition is not allowed (even if it does speak the language).

Rather than try and speak Russian, Jamie has been using French. He has asked Visual Studio if it talks a certain dialect (COM interface), and it has said “oui”. So he uses that dialect to talk to Visual Studio in order to do what he needs.

The main problem from Microsoft’s point of view is that they didn’t intend for anyone to use that dialect of French in order to talk to Visual Studio. They only expected Russian to be used. However, there’s nothing that explicitly states this. Microsoft even has public notes on the French dialect.

Therefore, Jamie thinks he’s in the right because Microsoft have not said that speaking French is forbidden. Microsoft sees it the other way. And the way things are going, it looks like the decision is going to come from a judge or jury.

There will be some French lessons in a follow up post.

You must be logged in to post a comment.