Microsoft Report Viewer Upgrade from 2005 to 2012 RRS feed

  • Question

  • Hi All,

    I have an web application in .net 2.0 with the report viewer references and the report viewer installed on server is 2005.

    Now I am upgrading the application to .net 4.6.2 and need to upgrade the report viewer to 2012 . While removing the old reference and adding the new reference , I am getting the below error. I am using VS2012.

    .net 2.0 web.config : 

          <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
        <compilation debug="true" defaultLanguage="c#" targetFramework="4.6.2">
            <add assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.DirectoryServices, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

    Error: The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\\Microsoft.ReportViewer.WebForms.DLL'

    Thursday, May 4, 2017 3:10 PM


  • Your code is referencing both v8 and v11 of the reportviewer assembly. You need to upgrade all instances. Your config file is trying to use v8 so you should change that to use v11. Note that the public key will have changed as well so update both values in all entries in your config file.

    After you've made these changes then look at the references in all your projects and ensure they all point to v11. Any that are using v8 should be changed.

    Michael Taylor

    • Marked as answer by SrikantMishra Thursday, June 29, 2017 2:38 PM
    Friday, May 5, 2017 3:07 PM