Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0

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

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

like image 235
3355307 Avatar asked Mar 07 '14 15:03

3355307


People also ask

How do I add Microsoft ReportViewer to Winforms?

To add the ReportViewer Control to a Windows application If the Toolbox is not visible, you can access it from the View menu by selecting Toolbox. Drag the ReportViewer control onto the design surface of the Windows Form. A ReportViewer control named reportViewer1 is added to the form.

How do I install Microsoft ReportViewer in Visual Studio 2017?

We can install Microsoft RDLC Report for Visual Studio 2017 in two ways, Installing from "Extensions and Updates" in Visual Studio 2017. Go to Visual Studio's Tools Menu > Extensions and Update > Select Microsoft RDLC Report Designer and Reporting Services Project for the Visual Studio.


1 Answers

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

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

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

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

like image 194
Dorschfisch Avatar answered Oct 04 '22 11:10

Dorschfisch