简体   繁体   English

Asp.net 将 .net 框架 4.0 更改为 3.5

[英]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.我在 asp.net 4.0 中有一个 Web 应用程序,但我想将 .net 框架更改为 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.无法加载文件或程序集 AspNet.ScriptManager.jQuery 或其依赖项之一。 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.说明:在执行当前 Web 请求期间发生未处理的异常。 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.异常详细信息:System.BadImageFormatException:无法加载文件或程序集 AspNet.ScriptManager.jQuery 或其依赖项之一。 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.执行当前 Web 请求期间生成了未处理的异常。 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. AspNet.ScriptManager.jQuery面向 .NET 4(或更高版本),而您面向 .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.因此,您需要找到一个面向 .NET 3.5 的AspNet.ScriptManager.jQuery版本,或面向 .NET 4 的应用程序。

Looking at the Nuget package for AspNet.ScriptManager.jQuery , it is only available for .NET 4 and above.综观NuGet包为AspNet.ScriptManager.jQuery ,这是仅适用于.NET 4及以上。 So if you want to use that package, your application has to target .NET 4 or above.因此,如果您想使用该包,您的应用程序必须面向 .NET 4 或更高版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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