Microsoft.ReportViewer.Webforms "[SerializationException] Member 'ReportServerErrorCode' was not found"

312 Views Asked by At

While working on a project to download and attach an Excel render of an SSRS report in a C# project using ReportViewer packages, I encountered the error:

[System.Runtime.Serialization.SerializationException] Member 'ReportServerErrorCode' was not found.

I had encountered it locally and found the fix trivial enough to not write down the solution. Upon deploying the branch to the QA server, I encountered it once more.

1

There are 1 best solutions below

0
On

The solution is a little complicated. I believe that his error essentially is a one-size-fits all bucket for reporting errors when you don't have the necessary .dlls to get Report Server Error codes. The packages on NuGet have the following .dlls:

  • Microsoft.ReportViewer.Common
  • Microsoft.ReportViewer.DataVisualization
  • Microsoft.ReportViewer.ProcessingObjectModel
  • Microsoft.ReportViewer.WebForms

In my case this was an error thrown by a dataset. The only way to get to the actual error was to look at the SSRS logs.