9

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 ?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Larry
  • 17,605
  • 9
  • 77
  • 106

1 Answers1

1

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.

devio
  • 36,858
  • 7
  • 80
  • 143
  • I tried this: it works very well. I have even the feeling that my project structure looks cleaner. Thanks a lot ! – Larry Jul 04 '11 at 07:52
  • I normally just revert any changes to the app.config (using SVN)... that works equally well and doesn't require another project. I had the same question here, but it's not really resolved to my liking: http://stackoverflow.com/questions/4625743/refreshing-service-references-updates-the-app-config – AtliB Oct 10 '11 at 12:05