更新“网络参考";作为TFS构建的一部分 [英] Updating "Web References" as part of TFS Builds

查看:67
本文介绍了更新“网络参考";作为TFS构建的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为TFS构建的一部分,是否有一种简便的方法来更新项目" Web参考"?

Is there an easy way to update Project "Web References" as part of a TFS build?

对于某些背景...我有一些Web参考指向公共服务.服务提供商会定期更改其合同,我希望在每晚的构建中发现这一点.

For some background... I have a couple Web References pointing at public services. The service providers change their contracts periodically and I'd like to discover this in a nightly build.

我知道我可以构建一个MSBuild任务,该任务下载WSDL并使用 svcutil 构建参考程序集,但这将意味着需要对项目结构进行更多更改. .NET堆栈,TFS或MSBuild是否内置可以满足我需要的东西?

I know I could build an MSBuild task that downloads the WSDL and build reference assemblies using svcutil but that would mean changing a lot more about the projects structure. Is there something built-in to the .NET stack, TFS, or MSBuild that could do what I need?

推荐答案

我会避免通过自动工具完成此更新.更改此类服务合同后,代码极有可能无法编译.即使代码确实可以编译,也应该有人检查WSDL更改是否需要在项目中采取其他措施,而不仅仅是更新服务客户端(甚至可能更改业务规则).

I would avoid having this update done by automatic tools. There is a strong possibility that the code would not compile after such a service contract change. And even if the code does compile, someone should still inspect whether the WSDL change requires some other actions to be taken in your project, other than just updating the service client (perhaps even changes in business rules).

我要做的是编写一个简单的工具,该工具可以定期下载WSDL并在发生任何更改时发送通知-这样,适当的人员就可以在这种情况下采取行动.

What I would do is write a simple tool that regularly downloads the WSDLs and sends notifications if anything changed - so the appropriate people can take action in such cases.

该工具可以在MSBuild中作为自定义工具运行,或者只需使用Windows Task Scheduler.

The tool could be run as a custom tool in MSBuild or simply using the Windows Task Scheduler.

这篇关于更新“网络参考";作为TFS构建的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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