This is an extension of my previous post on TFS and MSBuild. I have an msbuild script now that will do all of the grunt work of updating and compiling the code on a particular copy of our application. This can be easily called from the command line by overriding the properties defined inside the msbuild script. This way the same script can be reused for multiple applications.
Create a new text file called UpdateSite1.bat in the same folder as the msbuild script and enter something like the following:
@echo off
“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msbuild.exe”
getlatestsource.msbuild /p:solutionroot=”c:\inetpub\Site1″
/p:Workspacename=Site1
@Pause
Now all you have to do to update your site is double clicking the .bat script. You could create different bat scripts for each site that needs to be updated.



0 Responses to “TFS & MSBuild part 2 (batch scripts)”