Search code examples
visual-studio-2010sharepoint-2010web-parts

Unable to include report viewer web part. Error is, assembly has a higher version than referenced assembly


I am making a web part in VS 2010 for SharePoint 2010. The web part uses Report Viewer control. The files I have referenced in my project with Copy Local = True option are:

Microsoft.ReportViewer.Common.dll  
Microsoft.ReportViewer.WebForms.dll

Both are version 10 files.

When I build the project it works fine. But when I add this web part in a page it shows following error.

Compiler Error Message: CS1705: Assembly 'MySolution, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8acc41a360fa228d' uses 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I have already installed both Report Viewer 10 redistribute able and its SP1 but no luck. Also copied these DLLs to my SharePoint side bin folder. Did iisreset many times.

How to fix this issue?


Solution

  • Fixed it by updating my web.config which was referencing version 9 instead of 10.