3

我收到了这个错误:

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.dllis的属性Copy Local= true,并且此 dll 也在 bin 目录中。但错误保持不变。

我应该怎么做才能摆脱这个错误。

4

2 回答 2

2

将 web.config 文件中的版本更改System.Web.DataVisualization为项目框架版本。

前任。

System.Web.DataVisualization, Version=4.0.0.0

System.Web.DataVisualization, Version=3.5.0.0

确保更改所有等效项。

于 2015-12-17T06:43:02.437 回答
1

您可能需要检查您的项目是否使用了相对较新的 .Net 版本(4.0 或更高版本)。

请参阅 项目属性下的目标框架

项目属性

于 2013-04-04T05:31:55.923 回答