views:

18

answers:

1

I have a visual studio 2008 solution with approximately 15 projects. Several of these projects have a WCF service reference to a WCF service project. Whenever I update the service project, I have to go to each of the other projects and right click the service reference and update it. Is there an easier way to do this, like a "Update All Service References In Solution" button, somewhere, somehow?

A: 

There's no such functionality, really - at least none that I'd be aware of.

You could do one of two things:

  • have svcutil.exe update your service references - it's a command line tool, which you can batch up, or have executed during a build process

or:

  • if you're controlling both ends of the communication channel, and both are .NET, you could put your service and data contracts into a separate assembly (or several), and then share those assemblies between server side and client side code. You'd have to change the way you build up your client side proxies a bit (instantiate a ChannelFactory<T> and create the channel from that factory for each service contract), but that would be a one-time effort.

    Once done, any updates to the service and/or data contracts would be reflected in both the server side code, as well as your client proxy code.

    The only drawback here is: it only works for .NET-to-.NET communication - if you have non-.NET clients, those are left out in the cold, obviously.....

marc_s
I'll have to play around with those options, and will post my results here later.
Rodney Burton