Примітка
Доступ до цієї сторінки потребує авторизації. Можна спробувати ввійти або змінити каталоги.
Доступ до цієї сторінки потребує авторизації. Можна спробувати змінити каталоги.
This article helps you resolve the problem where you fail to build Microsoft .NET Framework 3.5 or lower projects on .NET Framework 4.0 MSBuild or team build where references require Serializer Generator (SGEN).
Original product version: .NET Framework 3.5, 4.0
Original KB number: 2572158
Symptoms
You may receive the following error when you build .NET Framework 3.5 or lower projects on .NET Framework 4.0 MSBuild or team build where references require Serializer Generator (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
To use mixed mode assemblies in .NET Framework 4.0, it must be configured in the configuration file for SGEN.
Resolution
Add the information 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>