简体   繁体   English

如何修复肥皂中的绑定失败?

[英]How do I fix a Binding Failure in Soap?

I reloaded an old project, and tried to run it only to run into the Binding Failure MDA Assistant: 我重新加载了一个旧项目,并尝试运行它只是为了遇到绑定失败MDA助手:

BindingFailure was detected 

Message: The assembly with display name 'SoapTest.XmlSerializers' failed to load in the
'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: 
System.IO.FileNotFoundException: Could not load file or assembly 
'SoapTest.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one 
of its dependencies. The system cannot find the file specified.

After googling this, the only solution I could find was to turn off the MDA. 谷歌搜索后,我能找到的唯一解决方案是关闭MDA。 This works, but I would prefer to solve the underlying problem (SoapTest.XmlSerializers.dll not being in the bin\\Debug directory). 这有效,但我更愿意解决底层问题(SoapTest.XmlSerializers.dll不在bin \\ Debug目录中)。 How can I fix this? 我怎样才能解决这个问题? What creates the SoapTest.XmlSerializers.dll, and why is it not being created on a Rebuild? 是什么创建了SoapTest.XmlSerializers.dll,为什么它不是在Rebuild上创建的? Yes, I have tried updating the Web Reference (this doesn't help). 是的,我已经尝试更新Web引用(这没有帮助)。 No I don't want to upgrade to WCF Soap Services. 不,我不想升级到WCF肥皂服务。

实际上是的,我进入了倾向窗口,并将“生成序列化程序集”的选项设置为“打开”,这样每次构建项目时都可以保证,我想当您编辑类库的汇编信息时会发生错误你正在引用而不重新构建它

在VS.NET中,您可以转到项目设置并尝试不同的XmlSerialization设置 - 我相信您可能要禁用自动设置。

I also encountered this issue. 我也遇到过这个问题。 The problem was that the project causing the Exception was created in another folder than the .exe file. 问题是导致异常的项目是在.exe文件之外的另一个文件夹中创建的。 I easily resolved it by changing the Deployment Path from Properties/Build settings page. 我通过从属性/构建设置页面更改部署路径轻松解决了这个问题。 No other change on "Generate serialization assembly" was necessary. “生成序列化组件”没有必要进行其他更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM