Crash during start debugging with Whidbey Beta 2

There is a crash that can occur when you start debugging with Whidbey Beta 2 on a machine that still has remnants of Whidbey Beta 1. Judging from Visual Studio Error Reporting, quite a few people have hit into this.

The problem.

  • The debugger has a primary interop assembly that is installed to the GAC
  • The version number for this assembly has never changed
  • It changed from an MSIL assembly, to an x86 assembly, which causes the installation directory to be different
  • Fusion apparently looks in the MSIL directory first, so the old assembly is loaded

Is this your problem?

You can use listdlls.exe from to see what version of the interop assembly you have running inside of Visual Studio. If you are running Whidbey Beta 2 and you don’t have 8.00.50215.44, then this is your problem.

>listdlls devenv | findstr /i Microsoft.VisualStudio.Debugger.Interop
  0x5ed70000  0x2e000   8.00.50215.0044  C:\WINDOWS\ assembly\ GAC\ Microsoft.VisualStudio.Debugger.Interop\\ Microsoft.VisualStudio.Debugger.Interop.dll

[spaces added for word-wrap]

Work around.

Well, the usual reason why the debugger primary interop assembly is needed is for the ‘Quick Console’ window, so if you turn off the quick console, you can probably avoid the problem. To do this: Uncheck Tools->Options->Debugger->Redirect all console output to the Quick Console Window

You could also remove the old interop assembly:

rmdir /s /q %windir%\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Interop\

The new one will still be installed in ‘assembly\GAC’, so you should be good.