未能加载文件或程序集“Microsoft.ReportViewer.WinForms 解决办法

异常信息:

未能加载文件或程序集“Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。
FileName: Microsoft.ReportViewer.WinForms,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
FusionLog: 警告: 程序集绑定日志记录被关闭。
要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。
注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。

 

解决方法:

RDLC报表所需的4个DLL文件提取 RDLC报表文件部 署在客户端若要正常工作,需4个dll文件,分别是:

1.Microsoft.ReportViewer.Common.dll,

2.Microsoft.ReportViewer.WebForms.dll,

3.Microsoft.ReportViewer.WinForms.dll,

4.Microsoft.ReportViewer.ProcessingObjectModel.dll,

网上可以下载到,将此四个dll文件放在项目的bin目录下即可解决。

 

前三个dll文件可以从 ..\Program Files\Microsoft Visual Studio 10.0\ReportViewer路径下可以拿到
注意要保证四个dll的文件版本一致

 

 

 

 

 

 

posted @ 2014-03-24 18:01  山海雍和  阅读(9687)  评论(0编辑  收藏  举报