c# - is there a way to automatically update proxy object when updating service on WCF? -



I have a WCF web service on which I am working. Currently every time I am changing the contract in my service on behalf of the server, then I need to update the service reference and re-create the proxy object used by the client "svcutil.exe". Anyway both have to do it automatically? I had once seen which client used to generate the reference in cc file but I do not know how he did it. I am using Visual Studio 2010.

So far what I found was different that was telling me to use the voluntary. It is not easy and usually I can get a simpler solution than CMD when dealing with VS.

"post-text" itemprop = "text">

If you want to automate your development work, learn the command line and squat.ax.

You should use svctuil.exe wsdl and proxy class that is "MyService.ClientApi". To make things easier, batch file is used in the service event's build event.

For more information, please read

After reading this code project, you will see

and you will see the beauty of different contracts and implementation in 2 projects.

Say, you have

  • MyServiceContracts.csproj to create a post build event with CreateWsdl.bat
  • MyServiceImp.csproj
  • MyServiceClientApi.csproj with CreateProxy.bat

    You can create CreateWsdl.bat call CreateProxy.bat. So every time you make changes to the contracts, you will have the new WSDL / XSD file published, and all MyServiceClientApi.dll will be used by all client programs.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -