Stop Certain folders or files from Overriding

We have certain folders in my application that i need to be static. Currently everytime we build these folders get overriden. Is there a way to stop the overriding of files or folders during building of our application, and if so what is the best way of going about this. We have tried to remove the folder from the build but this will cause errors during build run, Is it possible to have a condition like if the folder already exists then do not override else create the folder.

We would also like to know how to insert a file into a specific folder automatically on each build.

Thankyou

4 comments
Comment actions Permalink

Hi,

You can specify the Checkout Options (advanced options) on the VCS Setting in Build Configuration Settings page. If you set VCS checkout mode to "Do  not checkout files automatically", no build sources will be checked out. Also you can configure Check out rules for the VCS root, where you can specify which files should not be checked out.

> We would also like to know how to insert a file into a specific folder automatically on each build
You can also use checkout rules for this purpose (see http://confluence.jetbrains.com/display/TCD8/VCS+Checkout+Rules).

0
Comment actions Permalink

Thank you i have tried the above mentioned and it corrupts and fails the build, so i need my application to build but when teamcity runs the MSbuild build step in my configuration i want it to exclude publishing this folder. So i still need the folder to be built but i do not want it to be deployed.

Is this Posssible? If this is not a feature then i believe it should be.

0
Comment actions Permalink

No, it is impossible. When you run a build it will rewrite files in the working directory. In your case you can set working directory as parameter, so build will publish result files in different directories on agent. Or you can use artifacts to copy files from the working directory to the server.

0

Please sign in to leave a comment.