XmlSerializer is ambiguous in the namespace System.Xml.Serialization

  • Thread starter Thread starter kpg
  • Start date Start date
K

kpg

error: 'XmlSerializer' is ambiguous in the namespace
'System.Xml.Serialization'

In VS 2010 IDE at design time of an asp.net 4.0 site.

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.SqlClient
Imports System.Xml
Imports System.Xml.Serialization

Dim ser As New XmlSerializer(s.GetType) <- error reported here

The bin file has system.xml.serialzation.xml and
system.xml.serialzation.dll

If I delete the dll the error goes away, but when I build then dll is put
back into bin and the error returns.

The general help for '<name> is ambiguous in the namespace <namespace>'
says to fully qualify the name, so I tried:

Dim ser As New System.Xml.Serialization.XmlSerializer(s.GetType) and I get
the same error.

What is the problem and how can I fix it?

thx

kpg
 
Back
Top