5

I'm working in a C# project with web services, and I need to update the service reference for each environment in the company, I currently open the project in Visual Studio, right click on the service reference, update it and the create the published site, is there any way to perform this process faster, like using command line, so I can update the service reference and publish the site without going into Visual Studio? I would appreciate your help, thanks!

saman0suke
  • 762
  • 1
  • 8
  • 24

2 Answers2

0

You say you are using web service references. Then you should be able to update them using wsdl.exe. If you already have automated builds set up for your environments then you should be able to add a new task that refreshes them every time it builds.

If you are using MSBuild then look at this answer, that could be a solution for you. This of course has to be changed in every environment, that needs to bee renewed, but if you do it you should be safe for contract changes in the future.

Community
  • 1
  • 1
Mikael Engver
  • 4,634
  • 4
  • 46
  • 53
0

The command line utility to update service references is svcutil.exe There is a discussion about what you are trying to accomplish here and the documentation on svcutil is here

Community
  • 1
  • 1
fonics
  • 1