WCF:更新服务参考提供重复的配置条目 [英] WCF: Updating Service Reference gives duplicate config entries
问题描述
我有一个WPF应用程序,它使用对WCF服务的服务引用.在更新服务时,我需要更新服务参考,因此右键单击它,然后单击更新服务参考".
I have a WPF application using service references to a WCF service. When doing updates on the service I need to update the service reference, so I right click it and hit "Update Service Reference".
这样做将导致客户端项目的App.config文件中出现重复的条目.
Doing this results in duplicate entries in the App.config file of the client project.
- 它将复制 wsHttpBinding 下的绑定-在名称中添加一个后缀编号相等的条目:
WSHttpBinding_ISomeService --> WSHttpBinding_ISomeService1
. - 它复制了 binding 下的终结点定义,因此每个 wsHttpBinding 都有一个终结点.除名称外,这也是纯副本.
- It duplicates a binding under wsHttpBinding - adding an equal entry with postfix number in name:
WSHttpBinding_ISomeService --> WSHttpBinding_ISomeService1
. - And it duplicates the endpoint definition under binding such that there is one endpoint for each wsHttpBinding. This too is a pure duplicate except of the name.
为什么它会复制配置?难道不只是要更新名称吗?我该如何停止呢?
Why does it duplicate the config? Isn't it just supposed to update the name? And how can I make it stop?
推荐答案
您正在使用哪个版本的Visual Studio?这是一个已知的错误,已在VS2010中修复.查看此链接!
Which version of Visual Studio are you using? This is a known bug, which has been fixed in VS2010. Check out this link!
这篇关于WCF:更新服务参考提供重复的配置条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!