"Hybrid mode assembly is generated for the runtime version of" v2.0.50727 ". Error Solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.