In use. net2.0 and. in hybrid development of net4.0, when starting an application, the hybrid mode assembly is generated for the runtime of v2.0.50727. If no other information is configured, the Assembly cannot be loaded at the 4.0 runtime." This error message. The solution is as follows:
In the configuration section of APP. config, add the sub-section startup as follows:
<Startup uselegacyv2runtimeactivationpolicy = "true">
<Supportedruntime version = "v4.0" SKU = ". netframework, version = v4.0"/>
<Supportedruntime version = "v2.0.50727"/>
</Startup>
And the complete app. config looks like this:
<? XML version = "1.0"?>
<Configuration>
<Startup uselegacyv2runtimeactivationpolicy = "true">
<Supportedruntime version = "v4.0" SKU = ". netframework, version = v4.0"/>
<Supportedruntime version = "v2.0.50727"/>
</Startup>
</Configuration>
Read the full text
Category:C #/Asp.net view comments