Deploy generated files in TFS Build Server

二次信任 提交于 2020-01-23 19:00:46

问题


We use TFS Build Server on continuous integration. The result of build is web application which is deployed with Publish functionality integrated with MSBuild. We generate on build server, before build starts (Pre-build event), a minimized JavaScript files, which are copied in source directory on build machine. Sadly these aren't published in IIS, either are in Published Web Sites folder. How can wen accomplish this with Publish possibilities in TFS?

What we tried: We tried change the workflow (default template -> run on agent), but we are too late

What is our alternative: We would do XCopy when other possibilities will fail, but we would like to use Publish function

Please, describe the solution precisely and step by step, because I read many of the tutorials but they explain it not in depth. The simplest solution win. ;-)


回答1:


We fixed it the following way:

  • We also include the minimized javascript files in the corresponding project. (that's needed that the min files also get deployed during the publish process.)

  • In the Pre-Build event we delete all minimized javascript files like so: del /F "$(ProjectDir)JavaScript*.min.js" (/F is needed that also readonly files get deleted)

Thats it.

br rene_r



来源:https://stackoverflow.com/questions/5843785/deploy-generated-files-in-tfs-build-server

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