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

标签 asp.net .net

我有一个 ASP.NET 4.0 中的 Web 应用程序,但我想将 .NET 框架更改为 3.5。

如果我在属性中更改它并运行网络应用程序,则会出现错误:

无法加载文件或程序集 AspNet.ScriptManager.jQuery 或其依赖项之一。该程序集是由比当前加载的运行时更新的运行时构建的,无法加载。

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.

我现在真的不知道该怎么办。

谢谢!

最佳答案

部分异常消息掌握了问题的关键。

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

AspNet.ScriptManager.jQuery 的目标是 .NET 4(或更高版本),而您的目标是 .NET 3.5。因此,您需要找到面向 .NET 3.5 的 AspNet.ScriptManager.jQuery 版本,或者将您的应用程序面向 .NET 4。

查看 AspNet.ScriptManager.jQuery 的 Nuget 包,它仅适用于 .NET 4 及更高版本。因此,如果您想使用该包,您的应用程序必须面向 .NET 4 或更高版本。

关于Asp.net将.net框架4.0更改为3.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22867125/

相关文章:

asp.net - 如何使用 asp.net mvc razor 在 Telerik 网格中显示加载图像

c# - 上传的文件存放在哪里?

asp.net - ASP.NET 中的数据访问 : In-memory collection vs database

c# - 通过 Id 和名称获取下一个和上一个 sql 行,EF?

c# - 从 32-BPP 转换为 8-BPP 索引 (C#)

c# - c#.net 中的全局变量

.net - 添加自定义 xmlns 后 Xaml 智能感知不起作用

c# - 字符洗牌器

c# - NAudio播放IEEEFloat格式

java - Rijndael 256 加密 : Java and . NET 不匹配