无法加载文件或程序集'MyAssembly.XmlSerializers [英] Could not load file or assembly 'MyAssembly.XmlSerializers

查看:440
本文介绍了无法加载文件或程序集'MyAssembly.XmlSerializers的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对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.

谢谢。

推荐答案

已经有了答案<请在href = https://stackoverflow.com/questions/1127431/xmlserializer-giving-filenotfoundexception-at-constructor>此处。显然,这是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:


摆脱此问题的一种可能方法是在工具->选项->调试->常规选项中选中仅我的代码选项

One of the possible ways to get rid of this problem is check "Just my code" option in Tools -> Options -> Debugging -> General options

这篇关于无法加载文件或程序集'MyAssembly.XmlSerializers的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆