开发者

How can I prevent VS2010 to create a new binding each time I update a service reference?

开发者 https://www.devze.com 2023-03-16 22:02 出处:网络
I\'m developing a Winforms Client application with a WCF Service in C # 3.5 and Visual Studio 2010. Every time I use \"Update Service Reference\" in the IDE, considering I have already a working bind

I'm developing a Winforms Client application with a WCF Service in C # 3.5 and Visual Studio 2010.

Every time I use "Update Service Reference" in the IDE, considering I have already a working binding in app.config, an additional binding entry is generated with the same name and a trailing "1".

My app.config on the client side is :

开发者_开发技巧<bindings>
  <wsHttpBinding>
     <binding name="WSHttpBinding_IIssueTracker" closeTimeout="00:01:00"...

After a "Update Service Reference", I have :

<bindings>
  <wsHttpBinding>
     <binding name="WSHttpBinding_IIssueTracker" closeTimeout="00:01:00"...
     <binding name="WSHttpBinding_IIssueTracker1" closeTimeout="00:01:00"...

So I need to remove this unused binding all the time.

This is driving me nut. Is there a way to disable this behaviour ?


The way we solved this was to move the Service Reference to a separate library, and delete the (newly generated) app.config from the library project after executing Update Service Reference.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号