Microsoft.ReportViewer.Common Version = 12.0.0.0

arg*_*yle 10 .net reportviewer

我在Windows服务应用程序中遇到以下异常:

System.IO.FileNotFoundException:无法加载文件或程序集"Microsoft.ReportViewer.Common,Version = 12.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91"或其依赖项之一.该系统找不到指定的文件.

我找不到版本12的下载URL并将文件设置为"Include"和"Prequisite(Auto)"并不能解决此Windows服务应用程序中的问题,尽管它在我的WinForms应用程序中工作正常并导致相应的文件存在包含和引用以及所有其他必需的.DLL.

有人可以帮助我获取此Windows服务应用程序以包含文件,或者引导我到将在GAC中安装版本12的下载链接吗?

Dav*_*sey 40

ReportViewer位的第12版称为Microsoft Report Viewer 2015 Runtime,可以从以下链接下载以进行安装:

https://www.microsoft.com/en-us/download/details.aspx?id=45496

更新:

ReportViewer位也可以作为NUGET包使用:https://www.nuget.org/packages/Microsoft.ReportViewer.Runtime.Common/12.0.2402.15

Install-Package Microsoft.ReportViewer.Runtime.Common

  • 我现在正在尝试这个。尝试安装下载时,我收到一条关于需要在计算机上安装 MS SQL CLR Types 2014 的错误消息。我现在正在下载(https://www.microsoft.com/en-us/download/confirmation.aspx?id=42295),一旦我确认一切正常,就会将此标记为答案。谢谢! (2认同)

man*_*nit 5

I worked on this issue for a few days. Installed all packages, modified web.config and still had the same problem. I finally removed

<assemblies>
<add assembly="Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</assemblies>
Run Code Online (Sandbox Code Playgroud)

from the web.config and it worked. No exactly sure why it didn't work with the tags in the web.config file. My guess there is a conflict with the GAC and the BIN folder.

Here is my web.config file:

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <httpHandlers>
      <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />     
    </httpHandlers>    
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />      
    </handlers>
  </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)


ati*_*ker 5

在 IIS 服务器 PC 上部署后,我收到此错误。

  1. 首先安装 Microsoft SQL Server 2014 功能包

https://www.microsoft.com/en-us/download/details.aspx?id=42295在此处输入链接描述

  1. 安装 Microsoft Report Viewer 2015 Runtime 可再发行组件包

https://www.microsoft.com/en-us/download/details.aspx?id=45496

它可能需要重新启动您的计算机。