If an application requires the use of Report Viewer Redistributable and needs access to specific.dlls for. Them in your application and avoid GAC security errors (e.g., Could not load file or assembly 'Microsoft.
Something which I have been waiting for a long time has finally been released! The ReportViewer 2012 redistributable RTM package is available for download now!
Deployment notes
FYI, ReportViewer is used by Management Studio (SSMS), other utilities and also by any custom application which uses this to render local RDLC reports, or within a web application to view remotely rendered reports.
SQL 2012 installation deploys ReportViewer if the Management Tools are selected for installation. The other shipping vehicle for the ReportViewer control is Visual Studio 2012. This blog post pertains more to the case where we installed ReportViewer through the normal SQL 2012 installer.
FYI, you can view the ReportViewer 2012 assembly version at C:windowsassemblyGAC_MSILMicrosoft.ReportViewer.WinForms11.0.0.0__….. Right clicking on the assembly, and viewing the Details tab will give you the version of the DLL.
Note the ‘gotcha’
Now, the updated runtime release will deploy the equivalent of SQL 2012 SP1 binaries, so you get the latest and greatest bits! These should deploy a 11.0.3010 version for the Microsoft.ReportViewer.WinForms.dll file (and other files as well.)
Now, here’s the ‘note from the field’ thing which you can only get from me If you just install SQL 2012 SP1 (without later running the above download) it does not seem to update the ReportViewer control. Normally this may not have much visible impact, but if you are like me, you may want to keep the runtime up to date due to the number of important fixes in such updated versions.
Test case
In my tests, just applying SQL 2012 SP1 installation did NOT upgrade the runtime to 11.0.3000. It was still at 11.0.2100. However, applying the above updated runtime MSI will upgrade the runtime to 11.0.3010.
Your checkpoint is that the version of ReportViewer 2012 assembly under C:windowsassemblyGAC_MSILMicrosoft.ReportViewer.WinForms11.0.0.0__….. should finally be 11.0.3010 or higher. (repeat this check for the other controls such as Microsoft.ReportViewer.WebForms as well.
Conclusion
So in short, if you use ReportViewer – either indirectly (like in SSMS) or directly (through custom applications developed using Visual Studio 2012) it is highly recommended to update your RTM ReportViewer 11.0 runtime to the latest version using the MSI from the download link.
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
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.0ReportViewer 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
from C:Program Files (x86)Microsoft Visual Studio 11.0ReportViewer 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
Answers:
You can install the Microsoft Report Viewer 2012 Runtime and change your references so they point to the ones installed by the runtime.
I have installed the runtime without it asking for SQL Server 2012. Before installing try uninstalling any previous versions of report viewer.
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:WindowsassemblyGAC_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.
Answers:
As Microsoft.ReportViewer.2012.Runtime has
Microsoft.ReportViewer.WebForms
, Microsoft.ReportViewer.Common
and Microsoft.ReportViewer.ProcessingObjectModel
libraries, just run this command on PM Console: Install-Package 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. Hope this helps…
Answers:
Questions:
Could not load file or assembly ‘Microsoft.ReportViewer.Webforms’
or
or
Could not load file or assembly ‘Microsoft.ReportViewer.Common’
This issue occured for me in Visual studio 2015.
Reason:
the reference for Microsoft.ReportViewer.Webforms dll is missing.
Possible Fix
Step1:
To add “Microsoft.ReportViewer.Webforms.dll” to the solution.
Navigate to Nuget Package Manager Console as
“Tools–>NugetPackageManager–>Package Manager Console”.
Then enter the following command in console as below
PM>Install-Package Microsoft.ReportViewer.Runtime.WebForms
Then it will install the Reportviewer.webforms dll in “..packagesMicrosoft.ReportViewer.Runtime.WebForms.12.0.2402.15lib” (Your project folder path)
and ReportViewer.Runtime.Common dll in “..packagesMicrosoft.ReportViewer.Runtime.Common.12.0.2402.15lib”. (Your project folder path)
Step2:-
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.
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.
Step3:
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.
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.
Also refer the link below.
Answers:
Simply install Microsot.ReportViewer.2012.Runtime nuget package as shown in this answer https://stackoverflow.com/a/33014040/2198830
Answers:
Add Microsot.ReportViewer 2010 or 2012 in prerequisite of setup project then it first install Report Viewer if it’s not present in “C:WindowsassemblyGAC_MSIL…” and after installing, it installs set up project
Answers:
I Had the same problem.
The solution for me is:
You must have the same version of: Microsoft.ReportViewer.ProcessingObjectModel registred in C:WindowsassemblyGAC_MSILMicrosoft.ReportViewer.ProcessingObjectModel,
like you have registraded in web.config in developer server:
enter image description here
like you have registraded in web.config in developer server:
enter image description here
In my case i was only registred the 13. version in my prodution server and i have the 12. version in developer server.
the solution is install the version 12. in the prodution server too
the version 12. :
Then now i have the version 12. in the prodution and the report work fine.
*** Remember to reset your IIS after instalation
Answers:
I resolved this problem, searching the dll’s file in C:WindowsassemblyGAC_MSIL and copied to bin directory of the proyect deployed. That work for me.
Answers:
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.
Tags: file, view