Aplikasi yang saya gunakan tidak berfungsi ketika saya mencoba membuat serial.
Pernyataan seperti
XmlSerializer lizer = new XmlSerializer(typeof(MyType));
menghasilkan:
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)
Saya tidak mendefinisikan serializers khusus untuk kelas saya.
Bagaimana saya bisa memperbaiki masalah ini?
Generate serialization assembly
tarik-turun ke "Aktif", alih-alih "Otomatis".