Auto-Deploy script doesn't work with Check-In Policy

Nov 14, 2012 at 10:36 PM
Edited Nov 15, 2012 at 5:45 PM

As part of a regular automated deployment MSBuild script, a file is checked for the content, any SQL in it is run against the database, the file is emptied and the next step is to check it back in empty letting all the developers know that whatever was in it has been executed.  I also have in place, a Check-In Policy that says all check-ins must be associated with a Work Item.  So since this policy is in place, the automated check-in attempt errors out with (logically)...

 TfsSource: Executing tf.exe checkin "$/.../Scripts.sql"    /noprompt /recursive
 TfsSource: : Warning AutoDeploy.xml(251,5): Exit Code 100. Nothing Succeeded: TF10139: The following check-in policies have not been satisfied:
  You must associate this check-in with one or more work items.
No files checked in.
 The previous error was converted to a warning because the task was called with ContinueOnError=true.
 Build continuing because "ContinueOnError" on the task "TFSSource" is set to "true".

So the obvious question is: How can I manually override this in the script? I thought that's what "ContinueOnError=True" was for.  Evidently, I thought wrong.

Please help!

Nov 19, 2012 at 11:03 PM

Nevermind.  I figured it out using the OverrideText feature and it works successfully.  Thanks anyway.

Marked as answer by mikeFourie on 5/26/2014 at 10:01 AM