This is driving me nuts. I have a winforms app build in VS2012 targeting .NET 4.5. On a few forms I have to use a ReportViewer. At first I worked with ReportViewer for 2012 (version 18.104.22.168). All working fine. However, my client doesn't want to install this version on their workstations yet because this version uses the CLR Types SQL 2012. Don't ask me why, but I have to accept this for now.
So I decided to use the previous reportviewer version 10.0.0.0. I downloaded the redistributional package and installed it. I also added it to my toolbox in VS2012 and deleted the reportviewer dll's already referenced in my project. But when I drag a version 10 reportviewer on my form I get the following error:
Could not load file or assembly 'Microsoft.ReportDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The application IS running without errors, but I have no design-time support on the forms using this reportviewer control, as you can see in the image. I would like to get rid of the error.
I checked the GAC and could not find the mentioned Microsoft.ReportDesigner. It is there for version 22.214.171.124 and 126.96.36.199 but not for 10.0.0.0.
Bottom line, how can I use the ReportViewer version 10.0.0.0 in design time in VS2012 without the problem of the design-time error?
Framework: .NET 4.5 App Type : winforms Language : vb.net Visual Studio: Version 2012 Control: ReportViewer 10.0.0.0 SP 1
P.S. I also tested the ReportViewer control in VS2010, there is no problem using it in design time in VS2010.
The exact error when I try to add the ReportViewer on my form in VS2012 is:
I had the same problem. I was able to fix VS 2012 designer with the following workaround. I doubt this is the correct way, but it helps and I did not find anything better for now.
Close Visual Studio 2012
Go to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies folder and copy all report viewer assemblies (file names are starting with "Microsoft.ReportDesigner." and version is 10.0.0.0) to the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies. Backup it before doing this.
Start Visual Studio 2012 and open your project.
Alex's solution is wrong, it works but not right.
Simply solution is replacing old refence with current version's dll
I've removed removed reference Microsoft.ReportViewer.WinForms then added reference Microsoft.ReportViewer.WinForms which version is v188.8.131.52
Hope it helps.
Alex's fix works, but you end up in the previous version of the control. To get the v11 of the report viewer control, close your project if it is open then browse to c:\windows\assembly. Copy the public key token's value for the Microsoft.ReportViewer.Common.Resource version 184.108.40.206. Open your project file and search for the reference to the 10.0.0.0 version of the ReportViewer. Change the version to 220.127.116.11 and the public key to the value you copied and then save the file. Once you open the project, the ReportViewer reference should be pointing to the correct version.
Got the answer from CodeProject (see link below)
It doesn't need a license, it's a Redistributable
upload the the dll in your site bin
from this window folder
(C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer). i ve used it and it work
add reference with following path: C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\18.104.22.168__89845dcd8080cc91\Microsoft.ReportViewer.Common.dll
C:\Program Files (x86)\Microsoft Visual Studio 14.0\ReportViewer\Microsoft.ReportViewer.WinForms.dll
User contributions licensed under CC BY-SA 3.0