Wednesday, April 14, 2010

Assembly Uses 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'Microsoft.ReportViewer.WinForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'




Problem:
Build a project that uses ReportViewer and you get the following error:
Assembly Uses 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'Microsoft.ReportViewer.WinForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Solution:
Before you start, make sure the project is actually referencing Microsoft.ReportViewer.WinForms version 9.0. For some reason re-adding this in the references does not change the number in the project file. So after you are sure you're using version 9.0 do the following steps...

1. Open up the location of your project file. If you're using C# this is ProjectName.csproj
2. Open the project file with Notepad
3. Find the node containing Microsoft.ReportViewer.WinForms
4. Change the version number from 8.0.0.0 to 9.0.0.0 like the following picture:

References
1. http://davidsandor.com/blogs/tipsandtricks/archive/2008/07/16/solved-the-base-class-includes-the-field-reportviewer1-but-its-type-microsoft-reporting-webforms-reportviewer-is-not-compatible-with-the-type-of-control-microsoft-reporting-webforms-reportviewer.aspx  


 

No comments:

Post a Comment

There was an error in this gadget