Saturday, April 4, 2009

Visual Studio 2008 – PowerCommands Woes

April 04, 2009 Posted by Jason Irwin , , 1 comment

Today Visual Studio 2008 started crashing every time I attempted to open a specific XAML file. Ungracefully, the IDE shut down without warning, again and again and again…

Checking the event viewer I found the following error message:

The remote debugger is unable to communicate with Visual Studio, and must abort the remote debugging session. Please restart debugging.

The only recent update to my configuration is the installation of PowerCommands (link), an extremely useful toolkit that boosts (my) productivity by adding some additional commands to the IDE (other than this bug, it is definitely something I recommend checking out).

With this error message and hunch in hand, I set out to find the root of the problem and came across the following discussion on MSDN (discussion link), providing the following solution:

Using notepad (with elevated permissions in Vista/Windows 7) open the devenve.exe.config file in the path appropriate to your installation:

  • C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE – x86 path
  • C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE – x64 path

Add the following code to the assemblyBinding section of the config file:

   <assemblyIdentity name="Microsoft.PowerCommands" publicKeyToken="null" culture="neutral"/>
   <codeBase version="" href="C:\Program Files (x86)\PowerCommands\Microsoft.PowerCommands.dll"/>

This solved my (and, if you got here from google, hopefully your) problem!


John Croasdale said...

Worked for me too. Thanks for sharing!
If you ever find yourself in Nottingham (UK) I owe you a pint :-)

And here is me cursing the JetBrains addins that I recently installed, I forgot about the powertools I installed the other week. Oops! Sorry JetBrains