Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 无法加载文件或程序集';System.Web.DataVisualization';或者它的一个依赖项_C#_Asp.net - Fatal编程技术网

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