none
Compile error on RDLC - Details: The report definition has an invalid target namespace

    Question

  • Hello ,

    I have upgraded a VS 2005 project to a VS 2010 project but left the framework as 2.0.

    My project has a few RDLC linked into a MS SQL 2000 database.

    When i select one of the RDLC the ide asks me do i want to convert to RDLC 2008 format. If i say yes i then get the following error on the RDLC when i try and build the application.

    Error 11 The report definition is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded.  

    I have removed the version 8.0.0.0 version off MicroSoft.ReportViewer.Common and MicroSoft.ReportViewer.WinForms and added in the 10.0.0.0, but still the problem persists when doing a build

    Error 112 The report definition is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded.

    I have noticed the web config is a mixture between references to 8 and 10,

    e.g

    <

     

     

    httpHandlers>

    <

     

     

    remove verb="*" path="*.asmx"/>

     

     

     

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

    </

     

     

    httpHandlers>

    and

    <

     

     

    assemblies>

    <

     

     

    add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

     

     

     

    <

    add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <

     

     

    add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    <

     

     

    add assembly="Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>

     

     

     

     

    and

    <

     

     

    add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

     

     

    Wednesday, May 05, 2010 8:02 AM

Answers

  • Hello ,

    What i ended up doing was go back to the 2005 , convert the project again but this time upgdate the framework to 3.5.

    Then convert the reports as request when you select them in the solution explorer.

    Manually removed every single reference to 8.0.00 . Removed the report viewer control and added in the new one.

    Then started having problems with my ajax version !!!  Managed to sort that after a lot of hair pulling.

    All working nice on my localhost. Deployed to our development web server hey , guess what another crash !!!!.

    Thanks to a collegue , managed to work out the report viewer control 10.0.0 wasnt on the web server, had to track down a seperate install of the report viewer control for the web server.

    Long winded but got there in the end.

    Ps. Vs0210 if its not crashing on my devleopement box , it refuses to copy and paste even a single line (out of memory !!!) . Yep and its not the RC version . Ultimate if you like .

    Friday, May 14, 2010 12:42 PM

All replies

  • If you are going to use the VS 2010 control you need to make sure that all the references are 10.0 and remove all of the 8.0 entries. Also for the RdlBuildProvider you need to change the assemly from ReportViewer.Common to ReportViewer.WebForms. If that doesn't fix it I would suggest creating a new Report WebSite and take a look at the entries that are created in the web.config and copy them to you site. The error you are getting is because the build provider that is trying to compile the report is the 8.0 version and it expects the 2005 report schema.

    Matt M.


    This posting is provided "AS IS" with no warranties, and confers no rights

    Wednesday, May 05, 2010 4:01 PM
  • Hello Matt,

    Thanks for the reply. I tried what you suggested and cam across two issues , so far. I removed all references to report viewer 8.0.0 from bothe project and all references to report in the web config.

    Added in the version 10.0.0 references.

    Deleted the report viewer control from the aspx file and tried a complie got the following error

    Error 111 The type 'Microsoft.Reporting.WebForms.LocalReport' 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\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'

    Somehow it seems to still be confused about the version.

    When i dropped the report viewr onto the form got the following message as the project is still aimed at framwork 2.0,

    the .dll you are referencing using a newer version of the framework than the current project

    Any help would be good.

     

     

    Thursday, May 06, 2010 12:58 AM
  • It sounds like there is still a rogue reference in you project, check the markup for you aspx pages when you add a ReportViewer to a page it will add an assembly entry there as well. Also you will need to target .NET Framework 3.5 for the ASP ReportViewer to work; it has a dependency on ASP AJAX which is not available in .NET 2.0.

    Matt M.


    This posting is provided "AS IS" with no warranties, and confers no rights

    Thursday, May 06, 2010 6:05 PM
  • Matt , thanks once again. I noticed the dependency linked to the framework. Maybe the rogue reference to 8.0 is caused when adding the new reportvierwer control to a aspx but the project is a .net 2.0. caused by the dependency.

     I now need to take a step back and look at the implications of upgrading the project framework from 23.0 to 3.5 . If this can be done the maybe ! the rogue reference will be gone.

    Thanks again.

    Friday, May 07, 2010 12:03 AM
  • Sorry, but NO:

    "If you are going to use the VS 2010 control you need to make sure that all the references are 10.0 and remove all of the 8.0 entries".

    This SHOULD be:  "If Visual Studio 2010 forces you to either upgrade the report definition or revert to editing your report as XML" (which it does) " then Visual Studio should remove the references or upgrade them".

    This is typical Microsoft: release half-finished software with poorly thought out upgrade instructions that trash an existing (functional!) customer code base, then leave it up to the user to sort out the damage.

    If Visual Studio cannot perform the conversion properly then it should not offer to do it.  Period.  Warning the user that if they do not perform the conversion that they'll have to do report definition editing via the XML editor is a deliberate shove into a move that leaves him/her with a folder of trashed report definitions. 

    Thanks again Microsoft.

    Thursday, May 13, 2010 2:37 PM
  • Hi Marc,

    What Matt (and this thread in general) is refering to is not related to upgrading the RDLC report definition, but the version of the ReportViewer control itself and its dependencies as specified in the Web.config and ASPX file.

    The VS2010 control is an entirely new control which includes different framework support, thus work is needed to migrate an existing application to use the new control.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    Thursday, May 13, 2010 3:03 PM
  • I've got to respectfully but strongly disagree with you on this one. 

    The original post in this thread clearly states that the problem began with updgrading the RDLC (report definition).  It is this upgrade, performed by VS 2010 when the user first attempts to edit an existing report after upgrading a project/solution to 2010, that prompted the user to post. 

    After being led into allowing VS2010 to do the conversion, the user then discovered that the report definitions aren't compatible with the version of the ReportViewer control that the project conversion was (amazingly) blind to. 

    He tries to use an updated version of the ReportViewer control that's supposed to work with the converted definitions and that fails.  So now, as you said, "work is needed to migrate".  Work that could have and should have never had to been done by the user.  I'm amazed to hear it's too difficult for Microsoft to support a report definition format that's less than 2 years old. 

    To add insult to injury, after reloading all the RDLCs that 2010 trashed in my own version of this nightmare, I opted to go with the "Use XML Editor" alternative offered by the conversion dialogue.

    And VS 2010 promptly blew up. 

    Thursday, May 13, 2010 6:43 PM
  • Hello ,

    What i ended up doing was go back to the 2005 , convert the project again but this time upgdate the framework to 3.5.

    Then convert the reports as request when you select them in the solution explorer.

    Manually removed every single reference to 8.0.00 . Removed the report viewer control and added in the new one.

    Then started having problems with my ajax version !!!  Managed to sort that after a lot of hair pulling.

    All working nice on my localhost. Deployed to our development web server hey , guess what another crash !!!!.

    Thanks to a collegue , managed to work out the report viewer control 10.0.0 wasnt on the web server, had to track down a seperate install of the report viewer control for the web server.

    Long winded but got there in the end.

    Ps. Vs0210 if its not crashing on my devleopement box , it refuses to copy and paste even a single line (out of memory !!!) . Yep and its not the RC version . Ultimate if you like .

    Friday, May 14, 2010 12:42 PM
  • The solution suggested in the post

    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/f2a6d0a8-6c6f-467b-a1e2-210d7b0c42ec

    works. The solution compiles without errors even if you dont convert the old .rdlc files. Main culprit appears to be the following section in the config file that needs to be commented out.

    <buildProviders>

    <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </buildProviders>

    • Proposed as answer by Molku Thursday, July 26, 2012 3:47 PM
    Wednesday, July 21, 2010 2:48 AM
  • Marc -

    Thank you for underscoring this atrocious behavior.

    Bill


    bill
    Tuesday, April 26, 2011 3:31 PM