发布网站而不安装Microsoft Report Viewer

时间:2011-08-23 17:53:41

标签: iis reportviewer publish

我有一个只能访问ftp的Web服务器,我无法在其上安装Microsoft Report Viewer。

如何在不安装ReportViewer 的情况下将我的asp.net应用程序发布到IIS

我已将以下dll复制到我的站点bin文件夹:

  • Microsoft.ReportViewer.WebForms.dll
  • Microsoft.ReportViewer.Common.dll

现在我收到错误说:

  

本地报告处理期间发生错误   报告'Reports \ QuotationViewReport.rdlc'的定义无效   报告处理中发生意外错误   无法加载文件或程序集“Microsoft.ReportViewer.ProcessingObjectModel,Version = 10.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”或其依赖项之一。系统找不到指定的文件。

我甚至无法在本地计算机中找到名为Microsoft.ReportViewer.ProcessingObjectModel.dll的dll。

是否可以在不安装ReportViewer的情况下发布我的应用程序?

6 个答案:

答案 0 :(得分:19)

先决条件:在开发计算机上安装Microsoft ReportViewer程序集(answered by webkite)。

在Visual Studio中,从项目的“添加引用”操作中,选择“浏览”选项卡并浏览到GAC。 (C:\的Windows \组件\ GAC_MSIL)。

在那里,找到Microsoft.ReportViewer.ProcessingObjectModel程序集文件夹,选择适合您需要的版本子文件夹,并将程序集添加为本地参考。

然后在引用列表中找到程序集,并将其“本地副本”属性切换为true。

对于其他报表查看器程序集,您应该可以直接从“添加引用”对话框中的.Net选项卡添加它们。不要忘记将“local copy”属性也切换为true。

使用此设置,reportviewer程序集将在每次构建时复制到构建目录,您应该能够轻松地将它们复制到目标部署环境。

答案 1 :(得分:7)

下载&安装
Microsoft Report Viewer 2010可再发行组件包 http://www.microsoft.com/download/en/details.aspx?id=6442

答案 2 :(得分:3)

将这些文件添加到您网站的bin文件夹中:

  

Microsoft.ReportViewer.Common.dll

     

Microsoft.ReportViewer.WebForms.dll

     

Microsoft.ReportViewer.WebForms.xml

答案 3 :(得分:2)

现在可以作为NuGet包使用:

http://www.nuget.org/packages/Microsoft.ReportViewer.WebForms/

Install-Package Microsoft.ReportViewer.WebForms

答案 4 :(得分:1)

尝试C:\ Windows \ assembly并搜索Microsoft.ReportViewer.ProcessingObjectModel

或者

您可以在以下位置找到ReportViewer.exe:C:\ Program Files \ Microsoft Visual Studio 8 \ SDK \ v2.0 \ BootStrapper \ Packages \ ReportViewer \ ReportViewer.exe

运行ReportViewer.exe后,该文件将复制到部署计算机上的Global Assembly Cache文件夹

答案 5 :(得分:0)

你好,你可以找到打开你的项目的DLL文件 并添加引用并选择浏览并选择c:/ windowse / assemple / GAc_msil 在这里,您可以找到微软报告查看器文件夹并选择您想要的内容