Search code examples
.net-4.0gac

Assembly Version Conflict .net 4


Does anyone know about resolving this error??

The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms**9.0.0.0**__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms**10.0.0.0**__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'

I have referenced v10, when I check my GAC i found three versions of Microsoft.ReportViewer.WebForms. v9, v10, v11..! cant even able to remove older version of assembly from GAC.


Solution

  • I have resolved this with trail and error method. Assembly version was not updated in config file for some reasons. changed the version to 10 manually like this:

    <httpHandlers> 
       <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
    </httpHandlers>