C# 无法加载文件或程序集';System.Web.DataVisualization';或者它的一个依赖项
我收到了这个错误:C# 无法加载文件或程序集';System.Web.DataVisualization';或者它的一个依赖项,c#,asp.net,C#,Asp.net,我收到了这个错误: Server Error in Application. Could not load file or assembly 'System.Web.DataVisualization' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. Description: An unhan
Server Error in Application.
Could not load file or assembly 'System.Web.DataVisualization' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot 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 'System.Web.DataVisualization' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.DataVisualization' could not be loaded.
收到此错误后,我将system.web.DataVisualization.dll的属性更改为Copy Local=true
,并且此dll也位于bin目录中。但误差保持不变
我应该怎么做才能消除这个错误 您可能需要检查您的项目是否使用相对较新版本的.Net(4.0或更新版本)
请参见项目属性下的目标框架:
将Web.config文件中的System.Web.DataVisualization
版本更改为project framework版本
前
到
确保更改所有等效项。您的.net版本是什么
System.Web.DataVisualization, Version=4.0.0.0
System.Web.DataVisualization, Version=3.5.0.0