【DLL】神奇的 .XmlSerializers' could not be loaded.

神奇的 .XmlSerializers’ could not be loaded.

	开发webservice 时,发现无缘无故 在TFS 发布后的代码中 XXX.XmlSerializers 不在bin 上,反而在 站点的根目录下,导致管理员不同意直接 配置 Azure 上的自动部署,查明原因及解决方法。

错误信息:

Server Error in '/' Application.
Could not load file or assembly 'XXXXXXX.Service.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'XXXXXXX.Service.XmlSerializers' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Source Error:

解决办法:

1,修改.NET 版本,本来是2.0 ,升级到4.0 后解决问题。
2,修改项目属性的生成,将生成序列化程序及关闭。必须删除之前的缓存,否则生成还会受影响。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值