Ame Matthew Barker
Ame Matthew Barker

Reputation: 1

System.Xml.Serialization.IXmlSerializable'

I'm using monodevelop to make a program in C# in Linux. when I try to build the program this error comes out:

Build FAILED. Errors:

/home/interpuls/importcsv/utilities/TotalMilk/TotalMilk/TotalMilk.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

    MyDb.cs(126,16): error CS0012: The type `System.Xml.Serialization.IXmlSerializable' is defined in an assembly

that is not referenced. Consider adding a reference to assembly `System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

     0 Warning(s)
     1 Error(s)

I've already added System.xml, System.xml.linq and System.xml.serialization but nothing changed. Can anyone can tell me what should I do ?

Upvotes: 0

Views: 614

Answers (1)

Curt Toppin
Curt Toppin

Reputation: 29

Sounds like in "MyDb.cs" you've tried to make something serializable.

If that's the case you need to add a reference to "System.Xml" (ie using System.Xml) or you could remove whatever is trying to access it at line 126.

There may be extra work to add the ref in MonoDevelop. I'm unsure.

Upvotes: 0

Related Questions