Retired products

Licensing SDK applications in Visual Studio 2010

When building an SDK application in Visual Studio 2010, the following error may occur:

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.

To fix this, add or modify the application configuration file for lc.exe, which is the licence compiler for Visual Studio. Typically, this file exists in %programfiles%\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools.

Inside this folder, create a new file called lc.exe.config (or modify the existing file) and enter the following information:

<?xml version ="1.0"?>
<configuration>
    <runtime>
        <generatePublisherEvidence enabled="false"/>
    </runtime>
      <startup useLegacyV2RuntimeActivationPolicy="true">
            <supportedRuntime version="v4.0"/>
      </startup>
</configuration>

Didn't find what you were looking for?