XmlSerializer giving FileNotFoundException at constructor
Posted
by Irwin
on Stack Overflow
See other posts from Stack Overflow
or by Irwin
Published on 2009-07-14T19:19:24Z
Indexed on
2010/03/09
8:21 UTC
Read the original article
Hit count: 595
c#
|xml-serialization
An application I've been working with is failing when i try to serialize types.
A statement like this:
XmlSerialzer lizer = new XmlSerializer(typeof(MyType));
Produces:
System.IO.FileNotFoundException occurred
Message="Could not load file or assembly '[Containing Assembly of MyType].XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
Source="mscorlib"
FileName="[Containing Assembly of MyType].XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
FusionLog=""
StackTrace:
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
I don't define any special serializers for my class.
© Stack Overflow or respective owner