SGEN: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information

Article ID: 2572158 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

You may recieve the following error when building .NET 3.5 or lower projects on .NET 4.0 Msbuild or team build where references requires SGEN:


SGEN: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

CAUSE

In order to used mixed mode assemblies in 4.0, it must be configured in configuration file for Sgen

RESOLUTION

Add the infomation below to the sgen.exe.config file located at the following location: ..\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\

<?xml version ="1.0"?>

<configuration>

    <startup useLegacyV2RuntimeActivationPolicy="true">

                <supportedRuntime version="v4.0" />

    </startup>   

</configuration>
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2572158 - Last Review: July 13, 2011 - Revision: 1.0
APPLIES TO
  • Microsoft Visual Studio 2010 Professional
Keywords: 
KB2572158

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com