Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I automatically update a web reference at build time?

I have a .net project that has a web reference to a service. I would like to update that web reference as part of every build. Is that possible?

like image 404
HBFan Avatar asked Oct 01 '08 20:10

HBFan


People also ask

How do you update a Web service reference?

In Solution Explorer, open your project's App_WebReferences folder and click the node for the Web reference you want to update. Right-click the reference and click Update Web Reference. The new files for the XML Web service are downloaded to your project.


1 Answers

You can use MSBuild script with a task that calls wsdl.exe

  <Target Name="UpdateWebReference">
    <Message Text="Updating Web Reference..."/>
    <Exec Command="wsdl.exe /o &quot;$(OutDir)&quot; /n &quot;$(WebServiceNamespace)&quot; &quot$(PathToWebServiceURL)&quot;"/>
  </Target>
like image 89
Vivek Avatar answered Nov 15 '22 23:11

Vivek