Our TFS build controllers collect all projects from the same solution into the same bin directory, because the TFS build workflow passes the parameter OutDirto the msbuild command, which is responsible for building the solution.
I have a project in which I want to suppress this behavior and allow it to be embedded in the standard relative directory bin\Debugor bin\Release.
But I can not find how to do it. In fact, pay attention to the following trivial msbuild script:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutDir>$(MSBuildThisFileDirectory)bin\$(Configuration)</OutDir>
</PropertyGroup>
<Target Name="Build">
<Message Text="$(OutDir)" Importance="High"/>
</Target>
</Project>
Now I run it:
PS C:\> msbuild .\1.csproj /p:OutDir=XoXo /nologo
Build started 11/13/2015 9:50:57 PM.
Project "C:\1.csproj" on node 1 (default targets).
Build:
XoXo
Done Building Project "C:\1.csproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.03
PS C:\>
Note that XoXo is displayed , ignoring my attempt to redefine it from the inside.
So is this possible?