我该如何自动更新在构建时Web引用? [英] How do I automatically update a web reference at build time?

查看:94
本文介绍了我该如何自动更新在构建时Web引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET项目,有一个网站引用服务。我想更新Web引用,因为每个构建的一部分。这可能吗?

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?

推荐答案

您可以使用的MSBuild脚本调用的 Wsdl.exe用

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>

这篇关于我该如何自动更新在构建时Web引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆