TeamCity deletes files on build

纵然是瞬间 提交于 2019-12-04 10:04:49

Ok this is how I did it:

First I let TC check out and build the project in a separate folder on the site. The external dll's that were needed were moved from the 'bin'-folder to a separate folder and added to subversion (also updating the referenses in Visual Studio).

Now TC could build the project with no hassle.

Second I created a Post Build Script in Visual Studio like this:

xcopy "C:\TeamCityBuild\mavia_sip\WebSite\*" "C:\Inetpub\wwwroot\mavia_sip\WebSite\" /C /R /Y /E
if errorlevel 1 exit 0

The error handling is only needed to avoid script errors when someone builds the project on a environment without the correct folder structure.

So far everyting is working great!

The checkout directory should not contain any files you care about!

You should definitely be able to do "clean builds", and have TeamCity delete everything in the folder.

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