Visual Studio PowerCommands - Bug and Fix

After singing the praises of the Visual Studio PowerCommands yesterday I came across a problem. The solution I was working on was quite large (20+ projects), including some VSTO stuff which seemed to be the cause of the incompatability. The IDE was crashing and I was getting the following error in the Event Log:
.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506)

After Googling I found a fix, which involves hacking your devenv.exe.config (located in: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe.config).

After this section:

<dependentAssembly>
<assemblyIdentity name="office" publicKeyToken="71e9bce111e9429c" culture="neutral"/>
<codeBase version="12.0.0.0" href="PrivateAssemblies\Office12\Office.dll"/>
</dependentAssembly>

add this:

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

Restart Visual Studio.

I still fully recommend the PowerCommands, and if you come across this bug, well, you know how to fix it now!

Comments