问题
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