You are currently offline, waiting for your internet to reconnect

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

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>
MORE INFORMATION
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: 07/13/2011 14:57:00 - Revision: 1.0

Microsoft Visual Studio 2010 Professional

  • KB2572158
Feedback
com/ms.js"> icrosoft.com/ms.js"> y>kTracking = 1; var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" ng = 1; var Route = "76500"; var Ctrl = ""; document.write(" c.gif?DI=4050&did=1&t="> 1; var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write("