Why was System.Xml.Serialization.XmlSerializer undefined in an SSRS 2005 report?

I am trying to serialize a data structure and pass it to another report through a parameter, and this line of code:

Dim s As New System.Xml.Serialization.XmlSerializer(GetType(System.Collections.HashTable))

Produces this error:

An error occurred during local report processing.
The definition of the report '/myReport' is invalid.
There is an error on line 22 of custom code: [BC30002] Type 'System.Xml.Serialization.XmlSerializer' is not defined.

How can I get around this? I was able to use fully defined .NET classes in other lines of code, including the following:

Dim outStream As New System.IO.StringWriter()

and

Private colorMapping As New System.Collections.Hashtable()

Any ideas why this will fail? This is SQL Server Reporting Services 2005.

+3
source share
1 answer

So you can close the question:

You need to add a link to "System.Xml" in the project.

+3
source

Source: https://habr.com/ru/post/1728634/


All Articles