简体   繁体   中英

Asp.net change .net framework 4.0 to 3.5

I have a web application in asp.net 4.0 but i want to change the .net framework to 3.5.

If i change it in the properties and run the web app it gives me an error :

Can not load file or assembly AspNet.ScriptManager.jQuery or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and can not be loaded.

Description : An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.BadImageFormatException: Could not load file or assembly AspNet.ScriptManager.jQuery or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and can not be loaded.

An unhandled exception was generated during the execution of the current web request. On the basis of the following stack trace of the exception, you can obtain more information about the origin and location of the exception.

i really don't now what to do.

thank you!

Part of the exception message holds the key to the issue.

This assembly is built by a runtime newer than the currently loaded runtime and can not be loaded.

AspNet.ScriptManager.jQuery is targeting .NET 4 (or above), and you're targeting .NET 3.5. So you'll need to find a version of AspNet.ScriptManager.jQuery that targets .NET 3.5, or target your application at .NET 4.

Looking at the Nuget package for AspNet.ScriptManager.jQuery , it is only available for .NET 4 and above. So if you want to use that package, your application has to target .NET 4 or above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM