无法加载文件或程序集的Microsoft.ReportViewer。= 11.0.0.0常见,版本

时间:2021-01-09 02:46:31

I recently upgraded my n-tier solution from .NET 3.5 vs 2008 to 4.5 visual studio 2012. Every thing went fine apart from crystal reports and I had to install new runtime crystal reports for visual studio 2012 from the following link http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_5.exe. After installing the above package I had to resolve some deprecated function and properties of CrystalViewer and after that reports rendering properly in development environment (Windows 7 64 bit, SQL Server 2005, Visual Studio 2012). When I deployed the package in test environment windows server 2008 R2 the Application failed to load by throwing error Could not load file or assembly Microsoft.ReportViewer.WebForms, Version=11

我最近升级了我的n层解决方案,从。net 3.5 vs 2008到4.5 visual studio 2012。除了crystal报表之外,一切都很顺利,我不得不为visual studio 2012安装新的运行时crystal报表,链接为http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_5.exe。在安装了上述包之后,我必须解析CrystalViewer的一些废弃功能和属性,然后在开发环境中正确地报告呈现(Windows 7 64位,SQL Server 2005, Visual Studio 2012)。当我在测试环境windows server 2008 R2中部署这个包时,应用程序没有通过抛出错误来加载文件或组装Microsoft.ReportViewer。WebForms,Version = 11

I managed to resolve ReportViewer.WebForms error by copying the DLL from C:\Program Files (x86)\Microsoft Visual Studio 11.0\ReportViewer to bin folder of solution and set property copylocal = true and deployed the package. After that I received the error Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0 . I tried to search that DLL on my machine but couldn't. when project is running in visual studio, In Debug-> Windows->Module the file is not listed however in global assembly cache that file is installed but I don't know how its installed to global cache and from where . I found one solution that I had to install ReportViewer.msi from microsoft package but if i install this package it asks me to install SQL Server 2012 which I dont wan't. Could any one help me to resolve this issue. Thanks

我设法解析ReportViewer。WebForms错误通过复制的DLL C:\Program Files (x86)\Microsoft Visual Studio 11.0 \ bin文件夹的ReportViewer解决方案,集属性copylocal = true和部署包。之后,我收到错误无法加载文件或程序集的Microsoft.ReportViewer。= 11.0.0.0常见,版本。我试图在我的机器上搜索那个DLL,但是没有。当项目在visual studio中运行时,在Debug-> Windows->模块中,该文件没有被列出,但是在安装的全局程序集缓存中,该文件没有被列出,但是我不知道如何将其安装到全局缓存以及从哪里。我找到了一个必须安装ReportViewer的解决方案。微软软件包中的msi,但是如果我安装了这个软件包,它会要求我安装SQL Server 2012,而我并不想安装。有谁能帮我解决这个问题吗?谢谢

12 个解决方案

#1


24  

You can install the Microsoft Report Viewer 2012 Runtime and change your references so they point to the ones installed by the runtime.

您可以安装Microsoft Report Viewer 2012运行时并更改引用,以便它们指向运行时安装的引用。

http://www.microsoft.com/en-gb/download/details.aspx?id=35747

http://www.microsoft.com/en-gb/download/details.aspx?id=35747

I have installed the runtime without it asking for SQL Server 2012. Before installing try uninstalling any previous versions of report viewer.

我已经安装了运行时,它没有要求SQL Server 2012。在安装之前,尝试卸载报表查看器的任何以前版本。

#2


46  

Dont know if this is good to anyone, but search all these dlls:

不知道这对谁都有好处,但还是去搜索一下这些dll:

  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.ProcessingObjectModel.dll
  • Microsoft.ReportViewer.ProcessingObjectModel.dll
  • Microsoft.ReportViewer.WebForms.dll
  • Microsoft.ReportViewer.WebForms.dll
  • Microsoft.ReportViewer.WinForms.dll
  • Microsoft.ReportViewer.WinForms.dll
  • Microsoft.ReportViewer.DataVisualization.dll
  • Microsoft.ReportViewer.DataVisualization.dll

You find them in C:\Windows\assembly\GAC_MSIL\..., and then put them in the references of your project.

你在C:\Windows\assembly\GAC_MSIL\...找到他们,然后把它们放在项目的参考文献中。

For each of them say: local copy, and check for 32 or 64 bit solution.

对于每一个都说:本地拷贝,并检查32位或64位的解决方案。

#3


21  

As Microsoft.ReportViewer.2012.Runtime has Microsoft.ReportViewer.WebForms, Microsoft.ReportViewer.Common and Microsoft.ReportViewer.ProcessingObjectModel libraries, just run this command on PM Console:

Microsoft.ReportViewer.2012。运行时Microsoft.ReportViewer。WebForms,Microsoft.ReportViewer。常见和Microsoft.ReportViewer。ProcessingObjectModel库,只需在PM控制台运行此命令:

Install-Package Microsoft.ReportViewer.2012.Runtime

安装包Microsoft.ReportViewer.2012.Runtime

Note : If you want to completely remove the old Microsoft.ReportViewer.xxx references, you can remove them from Manage NuGet Packages>Installed Packages menu and then remove the related lines from packages.config file in your project. After that it will not comeback again during building of the project.

注意:如果您想完全删除旧的Microsoft.ReportViewer。xxx引用,您可以从管理NuGet包>安装包菜单中删除它们,然后从包中删除相关行。在您的项目中配置文件。在此之后,它将不会在项目建设期间再次出现。

Hope this helps...

希望这有助于……

#4


8  

You can download the nuget package too.

你也可以下载nuget包。

#5


7  

Could not load file or assembly 'Microsoft.ReportViewer.Webforms' or

无法加载文件或程序集的Microsoft.ReportViewer。Webforms”或

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

无法加载文件或程序集' microsoft.reportview . common '

This issue occured for me in Visual studio 2015.

这个问题在Visual studio 2015中出现了。

Reason:

原因:

the reference for Microsoft.ReportViewer.Webforms dll is missing.

Microsoft.ReportViewer的参考。Webforms dll是失踪。

Possible Fix

可能的解决

Step1:

步骤1:

To add "Microsoft.ReportViewer.Webforms.dll" to the solution.

添加“Microsoft.ReportViewer.Webforms。dll”解决方案。

Navigate to Nuget Package Manager Console as

导航到Nuget包管理控制台。

"Tools-->NugetPackageManager-->Package Manager Console".

“工具- - > NugetPackageManager - - >包管理器控制台”。

Then enter the following command in console as below

然后在控制台输入以下命令,如下所示

PM>Install-Package Microsoft.ReportViewer.Runtime.WebForms

点>安装包Microsoft.ReportViewer.Runtime.WebForms

Then it will install the Reportviewer.webforms dll in "..\packages\Microsoft.ReportViewer.Runtime.WebForms.12.0.2402.15\lib" (Your project folder path)

然后它将安装Reportviewer。"..\软件包\Microsoft.ReportViewer.Runtime.WebForms.12.0.2402.15\lib"(你的项目文件夹路径)

and ReportViewer.Runtime.Common dll in "..\packages\Microsoft.ReportViewer.Runtime.Common.12.0.2402.15\lib". (Your project folder path)

和ReportViewer.Runtime。常见的dll“. . \ Microsoft.ReportViewer.Runtime.Common.12.0.2402.15 \ lib \包”。(你的项目文件夹路径)

Step2:-

步骤2:-

Remove the existing reference of "Microsoft.ReportViewer.WebForms". we need to refer these dll files in our Solution as "Right click Solution >References-->Add reference-->browse ". Add both the dll files from the above paths.

删除“microsoft.reportview . webforms”的现有引用。我们需要在我们的解决方案中引用这些dll文件作为“右击解决方案>参考——>添加参考——>浏览”。从上面的路径中添加这两个dll文件。

Step3:

步骤3:

Change the web.Config File to point out to Visual Studio 2015. comment out both the Microsoft.ReportViewer.WebForms and Microsoft.ReportViewer.Common version 11.0.0.0 and Uncomment both the Microsoft.ReportViewer.WebForms and Microsoft.ReportViewer.Common Version=12.0.0.0. as attached in screenshot.

改变网页。配置文件指向Visual Studio 2015。注释掉两个Microsoft.ReportViewer。WebForms和Microsoft.ReportViewer。普通版本11.0.0.0和取消对Microsoft.ReportViewer的注释。WebForms和Microsoft.ReportViewer。= 12.0.0.0常见的版本。如附件截图。

Microsoft.ReportViewer.Webforms/Microsoft.ReportViewer.Common

Microsoft.ReportViewer.Webforms / Microsoft.ReportViewer.Common

Also refer the link below.

也请参考下面的链接。

Could not load file or assembly 'Microsoft.ReportViewer.WebForms'

无法加载文件或程序集' microsoft.reportview . webforms '

#6


2  

I had the same problem for Winforms.

我对Winforms也有同样的问题。

The solution for me is:

我的解决办法是:

Install-Package Microsoft.ReportViewer.Runtime.Winforms

#7


1  

Simply install Microsot.ReportViewer.2012.Runtime nuget package as shown in this answer https://*.com/a/33014040/2198830

简单地安装Microsot.ReportViewer.2012。运行时nuget包如下图所示:https://*.com/a/33014040/2198830

#8


1  

Add Microsot.ReportViewer 2010 or 2012 in prerequisite of setup project then it first install Report Viewer if it's not present in "C:\Windows\assembly\GAC_MSIL..." and after installing, it installs set up project

添加Microsot。在安装项目的前提下,如果没有出现在“C:\Windows\assembly\GAC_MSIL…”中,那么它首先安装报告查看器,安装之后,它安装了一个项目。

#9


0  

I resolved this problem, searching the dll's file in C:\Windows\assembly\GAC_MSIL\ and copied to bin directory of the proyect deployed. That work for me.

我解决了这个问题,搜索在C:\Windows\assembly\GAC_MSIL\ dll的文件并复制到proyect部署的bin目录。为我工作。

#10


0  

In my case, the 'Microsoft.ReportViewer.Common.dll' assembly is not required for my project, so I simply removed all references (Project -> Add Reference... -> ...) (all requirements from Publish tab the VS2013 removed automatically) and all works properly.

在我的例子中,是microsoft.reportview . common。我的项目不需要dll'程序集,所以我简单地删除了所有引用(project -> Add Reference…)->…)(所有来自发布选项卡的要求VS2013自动删除),并且所有功能正常。

#11


0  

Although rather late, but you can manually download the required DLLs from nuget at the following link: https://www.nuget.org/packages/Microsoft.ReportViewer.Runtime.Common/12.0.2402.15

虽然有点晚,但是您可以通过以下链接从nuget手动下载所需的dll: https://www.nuget.org/packages/microsoft.reportview.runtime.common/12.0.2402.15

Open the file .Rar Archive, extract the dlls and copy them manually to the bin folder of your publish.

打开文件. rar归档,提取dll并将其手工复制到发布的bin文件夹。

This solution worked for me. Hope that helps !!

这个办法对我起作用了。希望帮助! !

#12


0  

I Had the same problem.

我也有同样的问题。

The solution for me is:

我的解决办法是:

You must have the same version of: Microsoft.ReportViewer.ProcessingObjectModel registred in C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel, like you have registraded in web.config in developer server:

您必须拥有相同版本的:Microsoft.ReportViewer。在C:\Windows\assembly\GAC_MSIL\ ProcessingObjectModel registred Microsoft.ReportViewer。ProcessingObjectModel,就像你在web中注册的那样。在开发服务器配置:

无法加载文件或程序集的Microsoft.ReportViewer。= 11.0.0.0常见,版本

In my case i was only registred the 13. version in my prodution server and i have the 12. version in developer server.

我只登记了13个。版本在我的产品服务器,我有12。在开发服务器版本。

the solution is install the version 12. in the prodution server too

解决方案是安装版本12。在生产服务器上也是如此

the version 12. :

12的版本。:

https://download.microsoft.com/download/A/1/2/A129F694-233C-4C7C-860F-F73139CF2E01/ENU/x86/ReportViewer.msi

https://download.microsoft.com/download/a/1/2/a129f694 - 233 c - 4 c7c - 860 f - f73139cf2e01/enu/x86/reportviewer.msi

Then now i have the version 12. in the prodution and the report work fine.

现在我有了版本12。在生产和报告中工作得很好。

*** Remember to reset your IIS after instalation

***记得在安装后重置IIS

无法加载文件或程序集的Microsoft.ReportViewer。= 11.0.0.0常见,版本

#1


24  

You can install the Microsoft Report Viewer 2012 Runtime and change your references so they point to the ones installed by the runtime.

您可以安装Microsoft Report Viewer 2012运行时并更改引用,以便它们指向运行时安装的引用。

http://www.microsoft.com/en-gb/download/details.aspx?id=35747

http://www.microsoft.com/en-gb/download/details.aspx?id=35747

I have installed the runtime without it asking for SQL Server 2012. Before installing try uninstalling any previous versions of report viewer.

我已经安装了运行时,它没有要求SQL Server 2012。在安装之前,尝试卸载报表查看器的任何以前版本。

#2


46  

Dont know if this is good to anyone, but search all these dlls:

不知道这对谁都有好处,但还是去搜索一下这些dll:

  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.ProcessingObjectModel.dll
  • Microsoft.ReportViewer.ProcessingObjectModel.dll
  • Microsoft.ReportViewer.WebForms.dll
  • Microsoft.ReportViewer.WebForms.dll
  • Microsoft.ReportViewer.WinForms.dll
  • Microsoft.ReportViewer.WinForms.dll
  • Microsoft.ReportViewer.DataVisualization.dll
  • Microsoft.ReportViewer.DataVisualization.dll

You find them in C:\Windows\assembly\GAC_MSIL\..., and then put them in the references of your project.

你在C:\Windows\assembly\GAC_MSIL\...找到他们,然后把它们放在项目的参考文献中。

For each of them say: local copy, and check for 32 or 64 bit solution.

对于每一个都说:本地拷贝,并检查32位或64位的解决方案。

#3


21  

As Microsoft.ReportViewer.2012.Runtime has Microsoft.ReportViewer.WebForms, Microsoft.ReportViewer.Common and Microsoft.ReportViewer.ProcessingObjectModel libraries, just run this command on PM Console:

Microsoft.ReportViewer.2012。运行时Microsoft.ReportViewer。WebForms,Microsoft.ReportViewer。常见和Microsoft.ReportViewer。ProcessingObjectModel库,只需在PM控制台运行此命令:

Install-Package Microsoft.ReportViewer.2012.Runtime

安装包Microsoft.ReportViewer.2012.Runtime

Note : If you want to completely remove the old Microsoft.ReportViewer.xxx references, you can remove them from Manage NuGet Packages>Installed Packages menu and then remove the related lines from packages.config file in your project. After that it will not comeback again during building of the project.

注意:如果您想完全删除旧的Microsoft.ReportViewer。xxx引用,您可以从管理NuGet包>安装包菜单中删除它们,然后从包中删除相关行。在您的项目中配置文件。在此之后,它将不会在项目建设期间再次出现。

Hope this helps...

希望这有助于……

#4


8  

You can download the nuget package too.

你也可以下载nuget包。

#5


7  

Could not load file or assembly 'Microsoft.ReportViewer.Webforms' or

无法加载文件或程序集的Microsoft.ReportViewer。Webforms”或

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

无法加载文件或程序集' microsoft.reportview . common '

This issue occured for me in Visual studio 2015.

这个问题在Visual studio 2015中出现了。

Reason:

原因:

the reference for Microsoft.ReportViewer.Webforms dll is missing.

Microsoft.ReportViewer的参考。Webforms dll是失踪。

Possible Fix

可能的解决

Step1:

步骤1:

To add "Microsoft.ReportViewer.Webforms.dll" to the solution.

添加“Microsoft.ReportViewer.Webforms。dll”解决方案。

Navigate to Nuget Package Manager Console as

导航到Nuget包管理控制台。

"Tools-->NugetPackageManager-->Package Manager Console".

“工具- - > NugetPackageManager - - >包管理器控制台”。

Then enter the following command in console as below

然后在控制台输入以下命令,如下所示

PM>Install-Package Microsoft.ReportViewer.Runtime.WebForms

点>安装包Microsoft.ReportViewer.Runtime.WebForms

Then it will install the Reportviewer.webforms dll in "..\packages\Microsoft.ReportViewer.Runtime.WebForms.12.0.2402.15\lib" (Your project folder path)

然后它将安装Reportviewer。"..\软件包\Microsoft.ReportViewer.Runtime.WebForms.12.0.2402.15\lib"(你的项目文件夹路径)

and ReportViewer.Runtime.Common dll in "..\packages\Microsoft.ReportViewer.Runtime.Common.12.0.2402.15\lib". (Your project folder path)

和ReportViewer.Runtime。常见的dll“. . \ Microsoft.ReportViewer.Runtime.Common.12.0.2402.15 \ lib \包”。(你的项目文件夹路径)

Step2:-

步骤2:-

Remove the existing reference of "Microsoft.ReportViewer.WebForms". we need to refer these dll files in our Solution as "Right click Solution >References-->Add reference-->browse ". Add both the dll files from the above paths.

删除“microsoft.reportview . webforms”的现有引用。我们需要在我们的解决方案中引用这些dll文件作为“右击解决方案>参考——>添加参考——>浏览”。从上面的路径中添加这两个dll文件。

Step3:

步骤3:

Change the web.Config File to point out to Visual Studio 2015. comment out both the Microsoft.ReportViewer.WebForms and Microsoft.ReportViewer.Common version 11.0.0.0 and Uncomment both the Microsoft.ReportViewer.WebForms and Microsoft.ReportViewer.Common Version=12.0.0.0. as attached in screenshot.

改变网页。配置文件指向Visual Studio 2015。注释掉两个Microsoft.ReportViewer。WebForms和Microsoft.ReportViewer。普通版本11.0.0.0和取消对Microsoft.ReportViewer的注释。WebForms和Microsoft.ReportViewer。= 12.0.0.0常见的版本。如附件截图。

Microsoft.ReportViewer.Webforms/Microsoft.ReportViewer.Common

Microsoft.ReportViewer.Webforms / Microsoft.ReportViewer.Common

Also refer the link below.

也请参考下面的链接。

Could not load file or assembly 'Microsoft.ReportViewer.WebForms'

无法加载文件或程序集' microsoft.reportview . webforms '

#6


2  

I had the same problem for Winforms.

我对Winforms也有同样的问题。

The solution for me is:

我的解决办法是:

Install-Package Microsoft.ReportViewer.Runtime.Winforms

#7


1  

Simply install Microsot.ReportViewer.2012.Runtime nuget package as shown in this answer https://*.com/a/33014040/2198830

简单地安装Microsot.ReportViewer.2012。运行时nuget包如下图所示:https://*.com/a/33014040/2198830

#8


1  

Add Microsot.ReportViewer 2010 or 2012 in prerequisite of setup project then it first install Report Viewer if it's not present in "C:\Windows\assembly\GAC_MSIL..." and after installing, it installs set up project

添加Microsot。在安装项目的前提下,如果没有出现在“C:\Windows\assembly\GAC_MSIL…”中,那么它首先安装报告查看器,安装之后,它安装了一个项目。

#9


0  

I resolved this problem, searching the dll's file in C:\Windows\assembly\GAC_MSIL\ and copied to bin directory of the proyect deployed. That work for me.

我解决了这个问题,搜索在C:\Windows\assembly\GAC_MSIL\ dll的文件并复制到proyect部署的bin目录。为我工作。

#10


0  

In my case, the 'Microsoft.ReportViewer.Common.dll' assembly is not required for my project, so I simply removed all references (Project -> Add Reference... -> ...) (all requirements from Publish tab the VS2013 removed automatically) and all works properly.

在我的例子中,是microsoft.reportview . common。我的项目不需要dll'程序集,所以我简单地删除了所有引用(project -> Add Reference…)->…)(所有来自发布选项卡的要求VS2013自动删除),并且所有功能正常。

#11


0  

Although rather late, but you can manually download the required DLLs from nuget at the following link: https://www.nuget.org/packages/Microsoft.ReportViewer.Runtime.Common/12.0.2402.15

虽然有点晚,但是您可以通过以下链接从nuget手动下载所需的dll: https://www.nuget.org/packages/microsoft.reportview.runtime.common/12.0.2402.15

Open the file .Rar Archive, extract the dlls and copy them manually to the bin folder of your publish.

打开文件. rar归档,提取dll并将其手工复制到发布的bin文件夹。

This solution worked for me. Hope that helps !!

这个办法对我起作用了。希望帮助! !

#12


0  

I Had the same problem.

我也有同样的问题。

The solution for me is:

我的解决办法是:

You must have the same version of: Microsoft.ReportViewer.ProcessingObjectModel registred in C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel, like you have registraded in web.config in developer server:

您必须拥有相同版本的:Microsoft.ReportViewer。在C:\Windows\assembly\GAC_MSIL\ ProcessingObjectModel registred Microsoft.ReportViewer。ProcessingObjectModel,就像你在web中注册的那样。在开发服务器配置:

无法加载文件或程序集的Microsoft.ReportViewer。= 11.0.0.0常见,版本

In my case i was only registred the 13. version in my prodution server and i have the 12. version in developer server.

我只登记了13个。版本在我的产品服务器,我有12。在开发服务器版本。

the solution is install the version 12. in the prodution server too

解决方案是安装版本12。在生产服务器上也是如此

the version 12. :

12的版本。:

https://download.microsoft.com/download/A/1/2/A129F694-233C-4C7C-860F-F73139CF2E01/ENU/x86/ReportViewer.msi

https://download.microsoft.com/download/a/1/2/a129f694 - 233 c - 4 c7c - 860 f - f73139cf2e01/enu/x86/reportviewer.msi

Then now i have the version 12. in the prodution and the report work fine.

现在我有了版本12。在生产和报告中工作得很好。

*** Remember to reset your IIS after instalation

***记得在安装后重置IIS

无法加载文件或程序集的Microsoft.ReportViewer。= 11.0.0.0常见,版本