I feel I am missing something extremely basic; yet I have spent hours to no avail. I am trying to get a TFS build working and for the life of me I cannot figure out where this property gets set from.
I have picked up a TFS 2010 project from a team member that cannot help me at this time.
I have a simple TFS build that builds a solution.
In the tfproj file I have:
<SolutionToBuild Include="$(BuildProjectFolderPath)/MySolution.sln">
This seems to work, but for the life of me I cannot figure out how. I have not set the variable $(BuildProjectFolderPath) anywhere or anything resembling the correct path to MySolution.sln.
I have checked both the build definition, the build script, and the environment variables on the build box and I cannot figure out where the path corresponding to $(BuildProjectFolderPath) comes from.
Can someone help me unravel this black magic ?
Your build is actually performed by MSBuild. When MSuild starts, it gets some environment type of variables initialized that are project / solution specific. For example on the build server, the build agent will have injected its BuildProjectFolderPath value in MSBuild, that is used to resolve the macro that is in your tfsproj file.
No magic, just the environment that startup up to process your request supplies those values.