System.Xml.XmlCharType.InitInstance error

I’m trying to read an Xml file, using the standard .NET (2.0.50727) System.XML.dll (placed in the application folder), but I’m getting an error message that I don’t get, reading the same file, in a pure .NET runtime:

Cannot cast from source type to destination type. at System.Xml.XmlCharType.InitInstance() (via XmlTextReader…ctor)

Google didn’t turn up any results either, so I’m guessing it’s a mono<->.NET problem.

Should I be using a pure mono implementation? If so, is there a place I can get mono equivalents of .NET dlls without downloading and installing the whole mono package?

I had the same problem.

I also was using System.Xml from the .net framework.

Changing for System.Xml from the mono framework solved the problem.

You can only use the frameworks provided by unity, you can not add in new ones, you can only add in assemblies that use the frameworks.