Microsoft.ReportingServices.ReportViewerControl.WebForms – Error – “The definition has an invalid target namespace which can not be upgraded”

Background

Trying to evaluate an application, but it has been one issue after another.

Error

Error Image

TheDefinitionHasAnInvalidTargetNamespaceWhichCannotBeUpgraded.01.20191013.0911PM

Error Text

Microsoft.Reporting.WinForms.LocalProcessingException : An error occurred during local report processing.

–> Microsoft.Reporting.DefinitionInvalidException : The definition of the report is invalid.

Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: The report definition is not valid.

Details : The report definition has an invalid target namespace

http://schemas.microsoft.com/sqlserver/reporting/201601/reportdefinition

which can not be upgraded

— End of inner exception stack trace —
at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
at Microsoft.Reporting.WinForms.LocalReport.GetParameters

Resolution

Outline

  1. Visual Studio
    • Microsoft.ReportingServices.ReportViewerControl.WebForms
      • Install Package
        • Launch Nuget Console
        • Issue install command

Tasks

Visual Studio

Microsoft.ReportingServices.ReportViewerControl.WebForms

Install Package
Syntax

Install-Package [component] -Version [version]

Sample

Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms -Version 140.1000.523

Output – Image

Microsoft.ReportingServices.ReportViewerControl.WebForms.01.20191013.0818PM.PNG

Output – Text

PM> Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms -Version 140.1000.523

Attempting to gather dependency information for package 'Microsoft.ReportingServices.ReportViewerControl.WebForms.140.1000.523' with respect to project 'sqlnexus', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 695.35 ms
Attempting to resolve dependencies for package 'Microsoft.ReportingServices.ReportViewerControl.WebForms.140.1000.523' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.ReportingServices.ReportViewerControl.WebForms.140.1000.523'
Resolved actions to install package 'Microsoft.ReportingServices.ReportViewerControl.WebForms.140.1000.523'
Retrieving package 'Microsoft.ReportingServices.ReportViewerControl.WebForms 140.1000.523' from 'nuget.org'.
Retrieving package 'Microsoft.SqlServer.Types 14.0.314.76' from 'nuget.org'.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.reportingservices.reportviewercontrol.webforms/140.1000.523/microsoft.reportingservices.reportviewercontrol.webforms.140.1000.523.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.sqlserver.types/14.0.314.76/microsoft.sqlserver.types.14.0.314.76.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.sqlserver.types/14.0.314.76/microsoft.sqlserver.types.14.0.314.76.nupkg 155ms
Installing Microsoft.SqlServer.Types 14.0.314.76.
  OK https://api.nuget.org/v3-flatcontainer/microsoft.reportingservices.reportviewercontrol.webforms/140.1000.523/microsoft.reportingservices.reportviewercontrol.webforms.140.1000.523.nupkg 265ms
Installing Microsoft.ReportingServices.ReportViewerControl.WebForms 140.1000.523.
Adding package 'Microsoft.SqlServer.Types.14.0.314.76' to folder 'C:\personal\dadeniji\Script\SqlNexus\SqlNexus\packages'
Added package 'Microsoft.SqlServer.Types.14.0.314.76' to folder 'C:\personal\dadeniji\Script\SqlNexus\SqlNexus\packages'
Added package 'Microsoft.SqlServer.Types.14.0.314.76' to 'packages.config'
Executing script file 'C:\personal\dadeniji\Script\SqlNexus\SqlNexus\packages\Microsoft.SqlServer.Types.14.0.314.76\tools\install.ps1'
Successfully installed 'Microsoft.SqlServer.Types 14.0.314.76' to sqlnexus
Adding package 'Microsoft.ReportingServices.ReportViewerControl.WebForms.140.1000.523' to folder 'C:\personal\dadeniji\Script\SqlNexus\SqlNexus\packages'
Added package 'Microsoft.ReportingServices.ReportViewerControl.WebForms.140.1000.523' to folder 'C:\personal\dadeniji\Script\SqlNexus\SqlNexus\packages'
Added package 'Microsoft.ReportingServices.ReportViewerControl.WebForms.140.1000.523' to 'packages.config'
Executing script file 'C:\personal\dadeniji\Script\SqlNexus\SqlNexus\packages\Microsoft.ReportingServices.ReportViewerControl.WebForms.140.1000.523\tools\install.ps1'
Successfully installed 'Microsoft.ReportingServices.ReportViewerControl.WebForms 140.1000.523' to sqlnexus
Executing nuget actions took 51.63 sec
Time Elapsed: 00:00:52.6258238
PM> 

Credits

Crediting ….

Author :- DarioN1
Link :- Link

Comment :-

Finally I fixed the problem by removing ReportViewer 11.0.0 and by installing ReportViewerControl.WebForms:

Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms -Version 140.1000.523

 

Referenced Work

  1. Stack Overflow
    • rdlc in VS2018 WebApi : The report definition has an invalid target namespace which cannot be upgraded
      Link
  2. Microsoft
    • Docs
      • Docs/NuGet/Consume Packages
        • Install and manage packages with the Package Manager Console in Visual Studio (PowerShell)
          Link
    • Nuget
      • Microsoft.ReportingServices.ReportViewerControl.WebForms
        Link

One thought on “Microsoft.ReportingServices.ReportViewerControl.WebForms – Error – “The definition has an invalid target namespace which can not be upgraded”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s