we developer web pages in PHP and we must use Visual studio 2010 with Team foundation Server 2010. We try to create simple "build process" on TFS to copy our php files to drop folder.
I am using: DefaultTemplate.xaml And created my own: simple_zip.proj for MSBuild proces with following code:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<MySourceFiles Include="**\*.php"/>
</ItemGroup>
<Target Name="CopyFiles">
<Copy SourceFiles="@(MySourceFiles)" DestinationFolder="c:\MyProject\Destination" />
<Message Text="My Build Complete" />
</Target>
</Project>
And this works and copies to the server local path.
The problem is if I try to use any of MSBuild variables it does not work, like
Message Text="My Build Complete - $(BuildDir) - $(TargetDir) - $(BuildProjectFolderPath)>"
My text is displayed but variables are empty (I am looking debug level log files of msbuild process).
Also anything from the following link, simply does not work. Customizable Team Foundation Build Targets
So my question is, how can I get all path variables (sources dir, binaries dir, drop folder dir, build number and others from build definition/template) to my MSBuild on the TFS server ?
Thank you Kind regards