问题描述
我对IIS进行了一次内存转储,分析时发现了一个错误,提示无法加载文件或程序集MyAssemblyName.XmlSerializers 。在我的代码中,我使用XmlSerializer类将xml内容从xml文件序列化和反序列化到自定义对象。在构建项目时,它仅创建MyAssembly.dll和MyAssembly.pdb文件,而不创建MyAssembly.XmlSerializers.dll。有人知道如何使我的项目能够创建xmlserializers.dll文件吗?
I took a memory dump of IIS and while analyzing i found the error that said 'Could not load file or assembly MyAssemblyName.XmlSerializers'. In my code i am using XmlSerializer class to serialize and deserialize xml contents from xml file to custom object. When the project gets build it only creates MyAssembly.dll and MyAssembly.pdb file but not the MyAssembly.XmlSerializers.dll. Does anyone know how to enable my project to create xmlserializers.dll file?
注意:在项目生成选项卡中,生成序列化程序集设置为自动。 / strong>
Note: In project build tab, 'Generate serialization assembly is set to Auto.
谢谢。
推荐答案
已经有了答案此处。显然,这是MS无法解决的预期行为。
There's an answer already here. Apparently this is "expected behaviour" that MS isn't going to fix.
第一个评论有一种解决方法:
The first comment has a workaround:
这篇关于无法加载文件或程序集'MyAssembly.XmlSerializers的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!