Updating “Web References” as part of TFS Builds

牧云@^-^@ 提交于 2020-01-14 03:12:29

问题


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

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.

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?


回答1:


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).

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.

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



来源:https://stackoverflow.com/questions/8869044/updating-web-references-as-part-of-tfs-builds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!