• [原创]Microsoft.ReportViewer.ProcessingObjectModel


    使用微软ReportViewer控件做的报表(WinForm程序),

    安装到一台装有.NET 2.0 Framework的计算机上,

    运行时先后报以下的错:

    Could not load file or assembly Microsoft.ReportViewer.Common
    Could not load file or assembly Microsoft.ReportViewer.ProcessingObjectModel

    Google了一下,国外的一位高人有如下指点:

    http://www.am22tech.com/s/22/FORUM1/default.aspx?g=posts&m=12

    ————————————————————————————————————————

    Scenarios:
    -If you get the following errors:
    Could not load file or assembly Microsoft.ReportViewer.Common
    Could not load file or assembly Microsoft.ReportViewer. ProcessingObjectModel
    You can follow the following steps to copy it from GAC (Global Assembly cache):
    COPY Microsoft.ReportViewer. ProcessingObjectModel
    1. Open a command prompt (select Start/Run and then enter "cmd" and press enter).
    2. Type the following command and press enter:
    cd C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel
    2 (i) Type 'dir' and press 'enter'. You would be able to see the following folder:
    It depends on which version you have on your system. It can be either 8.0.0.0 OR 9.0.0.0.
    8.0.0.0__b03f5f7f11d50a3a OR
    9.0.0.0__b03f5f7f11d50a3a
    2(ii). Type "cd 8.0.0.0__b03f5f7f11d50a3a" if you have 8.0.0.0 version in step 3 OR
    "cd 9.0.0.0__b03f5f7f11d50a3a" if you have 9.0.0.0 and press 'enter'.
    2(iii). You should be able to see the following DLL in this folder:
    Microsoft.ReportViewer.ProcessingObjectModel.dll
    2(iv). Now use the following command to copy the dll file to your bin directory:
    copy *.dll d:\YourProject\bin
    3. COPY Microsoft.ReportViewer.Common
    cd C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common
    3 (i) Type 'dir' and press 'enter'. You would be able to see the following folder:
    It depends on which version you have on your system. It can be either 8.0.0.0 OR 9.0.0.0.
    8.0.0.0__b03f5f7f11d50a3a OR
    9.0.0.0__b03f5f7f11d50a3a
    3(ii). Type "cd 8.0.0.0__b03f5f7f11d50a3a" if you have 8.0.0.0 version in step 3 OR
    "cd 9.0.0.0__b03f5f7f11d50a3a" if you have 9.0.0.0 and press 'enter'.
    3(iii). You should be able to see the following DLL in this folder:
    Microsoft.ReportViewer.Common.dll
    3(iv). Now use the following command to copy the dll file to your bin directory:
    copy *.dll d:\YourProject\bin
    Here the path shown in red color should be the path of your project's bin folder.
    Hope it helps :)

    ————————————————————————————————————————

     

    在此基础上整理成以下cmd,复制进记事本另存为 Get ReportView's DLL.cmd:

    ————————————————————————————————————————

    @SET destFolder=.\bin
    @XCOPY /I /Y %SYSTEMDRIVE%\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.ProcessingObjectModel.dll %destFolder%\
    @XCOPY /I /Y %SYSTEMDRIVE%\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.Common.dll %destFolder%\
    @XCOPY /I /Y "%SYSTEMDRIVE%\Program Files\Microsoft Visual Studio 9.0\ReportViewer\Microsoft.ReportViewer.WinForms.dll" %destFolder%\
    @XCOPY /I /Y "%SYSTEMDRIVE%\Program Files\Microsoft Visual Studio 9.0\ReportViewer\zh-CN" %destFolder%\zh-CN\
    @explorer.exe %destFolder%

    ————————————————————————————————————————

  • 相关阅读:
    和菜鸟一起学产品之产品经理的自我管理能力
    和菜鸟一起学产品之产品经理的工作职责
    遗传算法解决TSP问题实现以及与最小生成树的对比
    双系统或三系统:Grub Rescue修复方法
    err:安装程序试图挂载映像 1(缺少ISO 9660图像)
    OpenCV手写数字字符识别(基于k近邻算法)
    最小生成树
    ubuntu12.04:Tomcat 7服务器:手动安装
    ubuntu12.04:jdk7:手动安装
    ubuntu12.04:Mysql数据库:手动安装
  • 原文地址:https://www.cnblogs.com/oneisyou/p/1696098.html
Copyright © 2020-2023  润新知