Pre-commit checkins

Hello guys,

I'm relatively new to TeamCity and may be my question is silly, but I can't find it anywhere on internet.
I'm trying to utilize pre-commit checkins (Personal Build) feature in TeamCity.
I've vreated TeamCity configuration with msbuild runner and Team Foundation Server as VCS.
My msbuild script does usual build routine:
1. Clean
2. Get Latest from source control
3. Compile
4. Run UnitTests
6. Sign
7.Drop
I've downloaded and installerd Visual Studio 2010 TeamCity plugin and properly configured it.
Now is the problem.......................
I'm changing one of the test to make it fail and trying to run <remote run>.
It triggers msbuild runner and runs the build.
Than suddenlly I get the mesage that the file I edited is not checked out and off cause build successed because my changes is not in VCS!!!!!!
Isn't this all point of pre-commit build to not checkin code untill it builds?

Am I missing something here?

Cheers,

monkzen

1 comment
Comment actions Permalink

Hi Yan

I'm sorry for so late response.

When TeamCity starts a personal build it checks out sources from version control using VCS root settings, aplies a patch with files modified in Visual Studio, and performs build steps.
If your build script contains source checkout logic , then these actions are performed twice, and cause a conflict.

To make it work remove checkout steps from the build script, and let TeamCity prepare all the sources automatically.
Also, we have a file cleaner that allows to automatically revert changes after each build.

Michael

0

Please sign in to leave a comment.