ReportViewer for MVC missing DLL dependancy

1.2k Views Asked by At

After installing ReportViewerForMVC I get an error:

Compiler Error Message: CS0433: The type 'Microsoft.Reporting.WebForms.ReportViewer' ...

How do I fix it?

1

There are 1 best solutions below

0
Jeremy Thompson On

Currently ReportViewerForMVC uses Visual Studio 2012's Microsoft.ReportViewer.WebForms DLL, version=11.0.0.0 as per the web.config:

<system.web>
        <httpHandlers>
            <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
        </httpHandlers>
</system.web>
  1. If you do not have this DLL installed, then you will need to install Visual Studio 2012 Report Viewer Runtime.

  2. If you do not have SQL Server 2012 installed, first you will be required to install Microsoft System CLR Types for SQL Server 2012, (direct links: X86 version, X64 version).

Microsoft.ReportViewer.WebForms version 11 will be added to the GAC:

enter image description here

  1. In Visual Studio add a reference to: C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.Common.dll