What does 'useLegacyV2RuntimeActivationPolicy' do in the .NET 4 config?

Posted by Cameron MacFarland on Stack Overflow See other posts from Stack Overflow or by Cameron MacFarland
Published on 2009-10-22T02:03:39Z Indexed on 2010/03/18 2:41 UTC
Read the original article Hit count: 1244

Filed under:
|
|
|

While converting a project that used SlimDX, and therefore has unmanaged code, to .NET 4.0 I ran into the following error:

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.

Googling around gave me the solution, which is to add this to the applications config:

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>
</configuration>

My question is, what is the useLegacyV2RuntimeActivationPolicy doing? I can't find any documentation about it.

© Stack Overflow or respective owner

Related posts about mixed-mode

Related posts about .net-4.0