Could Not Load File or Assembly 'Microsoft.Reportviewer.Common, Version=11.0.0.0

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

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

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.

Could not load assembly Microsoft.ReportViewer.Common, despite installing the prerequisites

The accepted answer pointed me in the right direction. However, didn't provide enough details for me to reach resolution. I wanted to add this as a comment to that answer but it was too long.

In my VS project, I had a reference to Microsoft.ReportViewer.WinForms version 12.0.0.0 and when deploying to another computer got the same error as present in this question. The key to the problem is a portion of the error:

The located assembly's manifest definition does not match the assembly
reference.

It is telling you that it found a DLL with the right name, but it is the wrong version. I had added a reference to Microsoft.ReportViewer.Common through the references dialog but I didn't catch that the only one listed in the "Extensions" section of the references dialog was for version 10.0.0.0. So of course it will deploy the wrong one if you are telling it to deploy the wrong one.

What you have to do is find the Microsoft.ReportViewer.Common.dll file with version 12.0.0.0 on your system and manually include a reference to that. For me it was in the following directory:

C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\12.0.0.0__89845dcd8080cc91\

Once I added that reference and set both DLLs to Copy Local in my VS project, then everything worked on the deployed machine.

Note: I did not require an installation of the Microsoft Report Viewer 2012 Runtime in order to have it work on the deployed machine. For any of you like me that were wanting to avoid any other installations during deployment.

Microsoft.ReportViewer.Common Version=12.0.0.0

Version 12 of the ReportViewer bits is referred to as Microsoft Report Viewer 2015 Runtime and can downloaded for installation from the following link:

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

UPDATE:

The ReportViewer bits are also available as a NUGET package: https://www.nuget.org/packages/Microsoft.ReportViewer.Runtime.Common/12.0.2402.15

Install-Package Microsoft.ReportViewer.Runtime.Common

assembly conflict Microsoft.ReportViewer.WebForms

Ran into a similar problem
Solution:
- Open the References tab on the project that references 'Microsoft.ReportViewer.WebForms'
- Select the reference - Microsoft.ReportViewer.WebForms, right click and select the properties option from the context menu.
- On the Properties tab ensure that Copy to local is set to True.



Related Topics



Leave a reply



Submit