title: Automatization Build Server TFS 2008 (vs 2008)
body: <p>I use VS 2008, Team Explorer and TFS. I'm looking to automate your builds by executing TFSBuild.exe command.</p>
  
  <p>I follow those steps:</p>
  
  <p>Open TeamExplorer, in VS2008, connected to TFS;</p>
  
  <p>My Team Project has a Build (named MainBuild) in Builds. Then, I do Query New build option.</p>
  
  <p>I fill the properties in window dialog opened:</p>
  
  <p>build Definition: Mainbuild</p>
  
  <p>Build Agent: Machine1BuildAgent</p>
  
  <p>drop folder for this build: \Machine1\Build_drop</p>
  
  <p>priority in queue: Normal</p>
  
  <p>MsBuild command-line arguments:</p>
  
  <p>/p:BuildAll=false /p:RunTest=false /p:SkipClean=true /p:SkipGet=true /p:SkipLabel=true /p:SkipGetChangesetsAndUpdateWorkItems=true</p>
  
  <p>In MDSN I have seen TFSBuild command and this sample:</p>
  
  <p>The following example builds the Nightlies build type which is in the AdventureWorks team project on server01. The resulting build is located on Machine1 in the BuildDrop directory.</p>
  
  <p>TFSBuild start <a href="http://server01:8080" rel="nofollow">http://server01:8080</a> AdventureWorks Nightlies /m:Machine1 /d:"C:\BuildDrop"</p>
  
  <p>edit: Now, for my issue, how can I do automation for build MainBuild for set the values for "MsBuild command-line arguments" using TFSBuild.exe command ?  I'm looking for a way to automatically have the TFS Build Agent job run nightly with command-line arguments..</p>
  
  <p>I need similar command line like this:</p>
  
  <blockquote>
    <p>TFSBuild start <a href="http://machine01:8080" rel="nofollow">http://machine01:8080</a> MyteamProject MainBuild /m:Machine1 /d:"\Machine1\Build_drop" /p:BuildAll=false /p:RunTest=false /p:SkipClean=true /p:SkipGet=true /p:SkipLabel=true /p:SkipGetChangesetsAndUpdateWorkItems=true</p>
  </blockquote>
  
  <p>I need pass the arguments (MsBuild command-line arguments) to TFSBuild.exe command and automatize the TFS build.</p>
  
  <p>any sample scripting code ?</p>