Tuesday, July 12, 2011

Microsoft.ReportViewer.Webforms version error


After you the report viewer you may get the following error when trying to use the ReportViewer Control:
CS0433: The type ‘Microsoft.Reporting.WebForms.ReportViewer’ exists in both ‘c:\WINDOWS\assembly\GAC_MSIL\
Microsoft.ReportViewer.WebForms\8.0.0.0__b03f5f7f11d50a3a\
Microsoft.ReportViewer.WebForms.dll’ and ‘c:\WINDOWS\assembly\GAC_MSIL\
Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\
Microsoft.ReportViewer.WebForms.dll’
The following will force the control to always use version 9.0 of the control.  Add the following to your web.config:

   
     
                                  publicKeyToken=”b03f5f7f11d50a3a” />
                                newVersion=”9.0.0.0″/>
     

   

 
Hope this helps.

No comments: