locked
Could not load file or assembly Microsoft.ReportViewer.WebForms, Version=9.0.0.0 RRS feed

  • Question

  • User672075783 posted

    Dear all,

    We had a .Net 2 (Visual Studio 2008) website which we have upgraded to .Net 4 and VS2010. This used ReportViewer to access the reporting services reports. (We have upgraded to SQL 2008 as well now.)

    I have changed my solution to use ReportViewer v10, and I can see that from the references, and I have changed all pages and web.config to point to v10 too. However when I run the deployed website I get the following error:

    Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. 
    

    I can't understand where it's looking for the v9 assembly from. Has anyone seen this problem before on how to fix it?

    Kind regards

    Sidharth

    Snippets from web.config:

    ...
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
              <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
              <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    ...
          </assemblies>
          <buildProviders>
              <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
          </buildProviders>
        </compilation>
    ...
    
        <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>
    </system.web>
    ...
    
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <handlers>
            <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
            <add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" resourceType="Unspecified" preCondition="integratedMode"/>
        </handlers>
    ...
    Friday, March 16, 2012 10:45 AM

Answers

  • User672075783 posted

    Hi,

    Yes I have managed to solve the problem. What I did was create a new web project and moved all the pages and code to the new project and then created a new web deployment project for it! No problems now.

    Kind regards

    Sidharth

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 21, 2012 6:53 AM

All replies

  • User672075783 posted

    Found out something else - I ran process monitor and it is trying to access the following registry keys:

    HKLM\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_policy.9.0.Microsoft.ReportViewer.WebForms__b03f5f7f11d50a3a
    
    HKLM\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\policy.9.0.Microsoft.ReportViewer.WebForms__b03f5f7f11d50a3a

    It gets a Name Not Found error when it does so - understandable as only report viewer 2010 redistributable is installed.

    Friday, March 16, 2012 11:10 AM
  • User1196771204 posted

    hi sidhath,

    have you managed to solve this issue?

    Monday, March 19, 2012 2:13 AM
  • User672075783 posted

    Hi,

    Yes I have managed to solve the problem. What I did was create a new web project and moved all the pages and code to the new project and then created a new web deployment project for it! No problems now.

    Kind regards

    Sidharth

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 21, 2012 6:53 AM