none
the report definition has an invalid target namespace 'http://schemas.microsoft.sqlserver.reporting/2008/01/reportdefinition' which cannot be upgraded".

    Question

  • Hi All,

                I have Visual Studio 2010, and .net framework 4.0 installed on my development machine.    I also have SQL Server 2008 installed (which you indicate above does not affect the issue).

               When I create a new Report project in Visual Studio 2010, the RDLC file has a reference inside it to .../2008/01/.... that looks like this:

    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

    I have tried this several times.  I have only built "loca" reports.  When I build on my local machine, the reports build and run just dandy.   But when I try to build them on our build server, running MSBUILD, the  build fails with:

    the report definition has an invalid target namespace 'http://schemas.microsoft.sqlserver.reporting/2008/01/reportdefinition' which cannot be upgraded".

    Im not sure why the new report didn't get created as /2010/, since everything I believe is using .net framework 4.0.       Any help greatly appreciated.

    Regards,

    Mike

     

     

    Wednesday, February 02, 2011 12:04 AM

All replies

  • Also, I checked that the project references are correct, they point to  Microsoft.ReportViewer.WinForms.dll 10.0.0.0.   
    Wednesday, February 02, 2011 12:07 AM
  • Does your build server have the ReportViewer 2010 redistributable package or VS2010 itself installed? How are you building your local reports on the build server (in the same solution, etc.)? Does your Web.config/App.config file have any remaining reference to 9.0.0.0?

    The 2008 schema is indeed the new schema used by VS2010 report designer. It looks like your build server is trying to build using the 9.0.0.0 bits, which only recognizes the 2005 schema.


    Cephas Lin This posting is provided "AS IS" with no warranties.
    Wednesday, February 02, 2011 4:59 PM
    Moderator
  • I had a very similar issue.  Just all of a sudden I could no longer build a VS2010 project that contained an .rdlc file.  I wasn't converting any reports or using a report server, everything was local.  I tried creating a brand new project and adding an empty new rdlc report and hit build and it wouldn't work.  Just one day it stopped compiling and gave me the following error:

     

    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.

     

    Turns out the issue was my "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\ReportingServices\Microsoft.ReportingServices.targets"  file had somehow changed.  The top of my file was:

     

    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <UsingTask TaskName="Microsoft.Reporting.RdlCompile" AssemblyName="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

     

    And it should have been:

     

    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <UsingTask TaskName="Microsoft.Reporting.RdlCompile" AssemblyName="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

     

    I changed that one "Using Task" line in the file and everything builds again.  REALLY frustrating and it ate up two days of my life. 

    Hoping posting this comment may help someone else in a similar situation.

     

    Jim Lafler

    Thursday, September 22, 2011 6:36 PM
  • Hi Jim,

    You are the hero man...It's resolved my problem and I was stuck with this for almost 1 month and was excluding from project whenever I build solution.

    Now, I'm able to build without issues. I'm also proposing as ANSWER.

    Thursday, January 12, 2012 11:58 AM
  • My Microsoft.ReportingServices.targets file is already set correctly, yet I'm still getting this error. Any other ideas?
    Friday, February 24, 2012 3:47 PM
  • Have anyone solve this problem?

    I have a Windows Azure project, and i can make sure the assembly of MS Report viewer is 10.0.0.0 in my web.config file, but i still get the same issue.

          <assemblies>
            <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
          </assemblies>

    Any ideas?
    Monday, March 26, 2012 1:36 AM
  • Thanks a lot Jim Lafler you saved me a lot of time.
    Friday, March 30, 2012 2:31 PM
  • Thanks Jim,  I had the same problem and your solution worked.

    For others, make sure you close your solution (Visual Studio) and open solution again.

    Wednesday, July 18, 2012 4:06 AM
  • Thanks HariOhm restarting visual studio worked.

    Saurabh Kumar

    Tuesday, September 25, 2012 1:28 PM
  • You Sir, are officially the man.
    Wednesday, December 05, 2012 3:53 PM
  • I've been trying to edit the file with  notepad++ but it doesn't save, please how do i do it "Using Task" Line

    I would be glad if you can help me out.

    Thanks

    Thursday, December 06, 2012 12:32 PM
  • Brilliant. It worked. Just had to remember to restart Visual Studio. Thanks Jim
    Tuesday, January 22, 2013 7:03 PM
  • I logged in specially to Thank you Jim Lafler.

    really good trick :)


    nofal

    Wednesday, February 27, 2013 7:09 PM
  • Awesome Jim.... It worked.
    Friday, March 22, 2013 1:53 AM
  • Thanks, it still works.
    Tuesday, October 01, 2013 6:00 PM
  • Hi Jim

    Could you please tell me how do i open this type of file and when i change it how do i save it because i tried a lot but couldn't do any thing

    Saturday, December 28, 2013 12:47 PM