原文:RDLC报表 在WinForm里运行出现 未能加载文件或程序集microsoft.reportviewer.winforms

推荐以下方案二

做一下记录顺便帮助一下遇到问题的朋友。

做RDLC报表在WinForm运行,在VS里面调试引用了“Microsoft.ReportViewer.Common.dll”和“Microsoft.ReportViewer.WinForms.dll”调试运行的时候没有问题。

之后我直接把Bin文件夹下的Debug目录拷到别的机器上运行,打印的时候出现了“未能加载文件或程序集microsoft.reportviewer.winforms”的错误。这是貌似因为在调试

运行的时候Bin目录的引用的DLL是本地路径下的,没有打包成安装程序在程序目录下没有这两个DLL,于是把这两个DLL文件拷贝到程序运行目录下重新在引用。紧接着又蹦出

了一个错误。具体的忘记了,大概是  on print Processing 什么的错误,这个问题测试了一下如果在运行软件的目标机器上 安装了 ReportViewer就不会有这个问题了,可是又

不能在每个客户机上都安装一遍ReportViewer。

解决这个问题:

1、可以把ReportViewer.exe文件解压出来。

2、找到里面的扩展名为“cab”的文件,继续解压。

3、找到扩展名为“cab”文件解压后目录里的“FL_Microsoft_ReportViewer_ProcessingObject_125592_125592_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8”。

4、把这个文件拷贝出来更改名称为“Microsoft.ReportViewer.ProcessingObjectModel.dll”。

最后把这个DLL文件放入Bin文件目录下在到VS里面引用一下。OK问题解决了!

-------------------------------------------------方案二(推荐)--------------------------------------------------------

这4个DLL文件放入Bin文件目录下,不需要VS引用

copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WinForms.dll C:\

copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.Common.dll C:\

copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Types\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Types.dll C:\

copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.ProcessingObjectModel.dll C:\

RDLC报表 在WinForm里运行出现 未能加载文件或程序集 Microsoft.ReportViewer.WinForms, Version=11.0.0.0 System.IO.FileNotFoundException的更多相关文章

  1. RDLC报表 在WinForm里运行出现 未能加载文件或程序集microsoft.reportviewer.winforms

    做一下记录顺便帮助一下遇到问题的朋友. 做RDLC报表在WinForm运行,在VS里面调试引用了“Microsoft.ReportViewer.Common.dll”和“Microsoft.Repor ...

  2. 未能加载文件或程序集 Microsoft.ReportViewer.Common, Version=11.0.0.0

    原文:未能加载文件或程序集 Microsoft.ReportViewer.Common, Version=11.0.0.0 System.IO.FileNotFoundException: 未能加载文 ...

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

    异常信息: 未能加载文件或程序集“Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken= ...

  4. 未能加载文件或程序集Microsoft.ReportViewer.WebForms, Version=10.0.0.0

    解决方案如下ASP.NET项目使用VS2010开发,部署到windows 2008环境中,出现未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=1 ...

  5. 未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件

    发布的打包项目在本机测试好使,部署到客户服务器上报错 分析器错误消息: 未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Cu ...

  6. 未能加载文件或程序集 Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0…错误问题的解决

    1.分析原因: 出现未能加载文件或程序集 Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0的问题的原因是,Microsoft ...

  7. 未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyT

    VS2008开发的网站,本地测试没问题,上传到服务器就出错,提示: 引用内容未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=9.0.0.0, C ...

  8. 未能加载文件或程序集 Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0

    写在前面 整理错误集.某一天在启动项目的时候,出现了未能加载文件或程序集 Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0错 ...

  9. 运行出错之未能加载文件或程序集“Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”或它的某一个依赖项。系统找不到指定的文件。文件名:“Microsoft.ReportViewer.Common, Version=11.0.0.0,

    这个问题是因为在项目中缺少Microsoft.ReportViewer.Common程序集. 方法一:缺少哪些文件或程序集,到程序开发计算机下找到对应的烤到客户端的程序启动目录下即可(项目烤到Bin\ ...

随机推荐

  1. 简单的Mvp设计

    任务:从网络上获取数据,然后显示在MainActivity的ListView上 一.载入需要用的框架 1.Mvp框架 compile 'com.hannesdorfmann.mosby:mvp:2.0 ...

  2. UVA 12657 Boxes in a Line

    双向链表 注意:如果算法是最后处理翻转情况时,注意指令4翻转后1,2两个指令也要翻转处理: 指令3 中交换盒子要注意两个盒子相邻的情况 #include <iostream> #inclu ...

  3. Vector, ArrayList, Array

    JAVA新手在使用JAVA的时候大概都会遇到这个问题: JAVA中的Array, ArrayList, Vector, List, LinkedList有什么样的区别?尤其是Vector, Array ...

  4. shell基础——字符串连接

    #!/bin/sh str1="hello" str2="world" echo str1=$str1, str2=$str2 strconn1=$str1$s ...

  5. jdk1.6下载页面

    http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-41940 ...

  6. linux之SQL语句简明教程---Alias

    接下来,我们讨论 alias (别名) 在 SQL 上的用处.最常用到的别名有两种: 栏位别名及表格别名. 简单地来说,栏位别名的目的是为了让 SQL 产生的结果易读.在之前的例子中,每当我们有营业额 ...

  7. 当浏览器不支持placeholder,所执行的函数

    $(function(){ //判断浏览器是否支持placeholder属性 supportPlaceholder='placeholder'in document.createElement('in ...

  8. Error in invoking target 'agent nmhs' of makefile

    安装Oracle11g报错:Error in invoking target 'agent nmhs' of makefile  解决方法:cd $ORACLE_HOME/sysman/libvi i ...

  9. android欢迎页源码

    直接上源码: import android.app.Activity; import android.content.Intent; import android.os.Bundle; import ...

  10. C# 根据年月获得此月第一天和最后一天,并计算工作日

    string str = "2015年3月"; ); ); , secondIndex - firstIndex - ); , ); DateTime dt = DateTime. ...