We use TFS 2010 with VS 2010 for PHP web projects. Actually we do not have any .proj or .sln file, so i have made my own to make builds, it looks like this:
To run AfterBuild
targets:
<DefaultTargets="AfterBuild" />
<Target Name="Build" DependsOnTargets="Zip">
<Target Name="AfterBuild" DependsOnTargets="Build">
For me is not clear why Zip
target should be executed before the Build
target?
EDIT:
You have to update template file defaultTemplate.XAML
by adding manually BuildNumber to the MSBuild command line so command Line would be like:
<mtbwa:MSBuild CommandLineArguments="[String.Format("
/p:SkipInvalidConfigurations=true
/p:BuildNumber={1} {0}",
MSBuildArguments,
BuildDetail.BuildNumber)]" />
See the original article regarding this trick: TFS2010 – Where is $(BuildNumber)?