update web reference through commandline
Is there a way to update web reference in a Visual Studio 2008 project through command line? I have a test code that reference to a web service.I want to run this against different servers and trying to write a script for this.开发者_开发百科
This is possibly the duplication of the following:
How update web reference from VS 2008 command line?
I got this working with the following :
WDSLBuildParameters.xml
<wsdlParameters xmlns="http://microsoft.com/webReference/">
<nologo>true</nologo>
<parsableerrors>true</parsableerrors>
<sharetypes>true</sharetypes>
<webReferenceOptions>
<verbose>true</verbose>
<codeGenerationOptions>properties newAsync</codeGenerationOptions>
<style>client</style>
</webReferenceOptions>
</wsdlParameters>
UpdateWebReferences.bat
>> PSUDOCODE here... Executed from the .\Web References\yourproxyclass folder...
wsdl.exe /n:yournamespace.yourproxyclass /parameters:"WDSLBuildParameters.xml" /out:"Reference.cs" "http://yourserviceendpoint"
Disco.exe "yourserviceendpoint:port"
SvcUtil.exe /n:"*,proxyclass" "http://yourserviceendpoint:port"
REM Copy and rename files...
COPY /y Reference.cs ..\
COPY /y results.discomap Reference.map
This generates everything except the .datasource files, but in my case I don't need them updated so I am happy with the solution.
精彩评论