the report definition has an invalid target namespace '' which cannot be upgraded".


  • 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="" xmlns:rd="">

    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 '' 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.





    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   
    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

    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 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
  • 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 '' 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="">
      <UsingTask TaskName="Microsoft.Reporting.RdlCompile" AssemblyName="Microsoft.ReportViewer.Common, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>


    And it should have been:


    <Project xmlns="">
      <UsingTask TaskName="Microsoft.Reporting.RdlCompile" AssemblyName="Microsoft.ReportViewer.WebForms, Version=, 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 in my web.config file, but i still get the same issue.

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

    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.


    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 :)


    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
  • hi jim Lafler i have the similar problem but the version in Microsoft.ReportingServices.targets is  already Version= but even though i m getting the same error and the error is

    "An error occurred during local report processing.

      • The definition of the report 'SSRS.rdl' is invalid.
        • The report definition is not valid. Details: The report definition has an invalid target namespace '' which cannot be upgraded.


          SSRD.rdl is my SSRS report which has map controller 

          pls help me any one i have struct in this problem from past four days

    Wednesday, July 22, 2015 5:22 AM
  • Thks a lot !!!!
    Tuesday, January 19, 2016 3:20 PM