TeamCity deletes files on build

I am a newbie to TeamCity and Continuous Integration. I have followed this very nice guide to set everything up and it all seemed to work at first.

TC could check out the files from SVN and it could build them with no problems. However I discovered that the 'Checkout directory'-setting was wrong, it pointed one folder above where it should be hence adding all new files from SVN in the wrong place but still building on the old ones. After correcting this the problems started.

Now every time TC does a build it cleares all files in the 'Checkout directory' the problem with this is that not all files needed are managed by SVN and they are deleted forever. Since not all necessary files are there the build fails.
What should I do to make TC keep the files not under version control. The project is a website running on IIS and a CMS called Sitecore.

Any ideas?

BR, Larre

1 comment
Comment actions Permalink

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:
copy "C:\TeamCityBuild\mavia_sip\WebSite\*" "C:\Inetpub\wwwroot\mavia_sip\WebSite\"
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!

BR Larre


Please sign in to leave a comment.