Visual Studio 2008 Crashes After Installing PowerCommands Add-In

Source: Microsoft Support

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

Action

You are using Visual Studio 2008 with the Visual Studio PowerCommands Add-In installed.

Result

When working with Visual Studio, it crashes unexpectedly and you see information similar to the following in the Windows Application event log.


Log Name: Application
Source: .NET Runtime
Event ID: 1023

.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (000007FEF671203F) (0)

Cause

This is due to a bug in the Common Language Runtime (CLR) when loading assemblies. In some scenarios, the CLR might reject a native image for a particular assembly based on the context it was requested to load in, rather than the context it actually belongs to. This can cause the native image for the assembly to be lost at some point while the process is running. When the CLR detects this condition, it purposely throws the ExecutionEngineException (Fatal Execution Engine Error), which terminates the process. 

In this scenario, System.Core.dll is reuqested by Microsoft.PowerCommands.dll. In certain scenarios, System.Core.dll loses its native image and is loaded in the wrong context, which results in the crash.

Resolution

You can resolve the issue by adding a <dependentAssembly> entry for Microsoft.PowerCommands in the Devenv.exe.config file.

1. Using Notepad, open the devenv.exe.config file which is situated under "\Program Files\Visual Studio 9\Common7\IDE" folder.
2. Locate the <assemblyBinding> element underneath the <runtime> element. You should see a number of <dependentAssembly> elements listed under this.
3. Add the following <dependentAssembly> entry at the bottom of the <dependentAssembly> entries.

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


4. Be sure to place the path to Microsoft.PowerCommands.dll with the path to it on your computer.
5. Save the file and close it.
6. Restart Visual Studio 2008.

DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.


TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
Eigenschappen

Artikel-id: 967679 - Laatst bijgewerkt: 9 feb. 2009 - Revisie: 1

Feedback