How can I prevent VS2010 to create a new binding each time I update a service reference?
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.
精彩评论