Reputation: 21
I'm setting up TFS to publish a WPF project. To setup the publish, I tried to get the SourceDirectory from the EnvironmentVariable through the GetEnvironmentVariable Activity and load into a variable. But the SourceDirectory always turns empty.
Does the SourceDirectory turn up by default of should I set something to make the SourceDirectory show up in the EnvironmentVariable? Thanks.
Upvotes: 0
Views: 55
Reputation: 6379
How I have done this is to modify the build template, so I would initialise build directory and binaries subfolder as follows:
<mtbwa:GetBuildDirectory DisplayName="Get the Build Directory"
Result="[BuildDirectory]" />
<Assign x:TypeArguments="x:String"
DisplayName="Initialize Binaries Directory"
To="[BinariesDirectory]"
Value="[String.Format("{0}\Binaries", BuildDirectory)]" />
Then you can copy the output binaries like so:
<mtbwa:CopyDirectory Destination="[CopyToFolder]" Source="[BinariesDirectory]" />
The "BuildDirectory" and "BinariesDirectory" variables would be declared as follows:
<Variable x:TypeArguments="x:String" Name="BuildDirectory" />
<Variable x:TypeArguments="x:String" Name="BinariesDirectory" />
Upvotes: 1