1
votes

I have a TFS build that runs on a schedule. Within the build process I have a step that checks out that project's properties file, increments the assembly's version number, then checks in the file bypassing any gated check-ins. This is creating a problem as the check-in of the properties file automatically sets the scheduled build to run the next day, causing an infinite loop.

My question is, is there a way to associate changesets made within the build process to the current running build?

I've tried refreshing the build detail and re-associating changesets after the msbuild compiles the project, but before the build finishes, without success.

Our projects are for Visual Studio 2010 and we are running against TFS 2013.

EDIT 12/21/15: For clarification:

I know about the NO_CI for bypassing CI Builds and including the /bypass in the command line. Overall my check-in that I am doing looks like the following:

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" Checkin %My_FILE% /comment:"***NO_CI*** Version Updated to %NewVersion%" /noprompt /bypass

I"m having trouble with scheduled builds kicking off, because my check-in is telling it that there is a changeset to build.

1
My final solution was to alter the ***NO_CI*** to \\***NO_CI***\\. Evidently this was a feature added to TFS 2013 update 2 that I didn't know about.bsumner

1 Answers

0
votes

You need to check in without triggering the build.

To tell the build system to ignore the check-in operation, a check-in comment value***NO_CI*** is specified to indicate "No Continuous Integration" meaning "please don't start a CI build because of this check in". Place the following into the comment field:***NO_CI***and when you check-in TFS will not kick off a build. More details for your reference: http://bartwullems.blogspot.hk/2012/08/tfs-do-check-in-without-triggering.html

update

You could customize your build template and add in the custom TFSVersion activity from the TFS Community Build Extensions that will handle this. Detailed steps for your reference:http://tfsbuildextensions.codeplex.com/wikipage?title=How%20to%20integrate%20the%20TfsVersion%20build%20activity&referringTitle=Documentation