<Target Name="TestMessage" AfterTargets="Build" >
<!--Use $(Property Name) to reference a property-->
<Message Text="Build version is: $(BuildProperty)" Importance="high"/>
</Target>
</Project>
And then I added an environment variable for property BuildProperty in the MSBuild Step:
BuildProperty ${build.version}
from the log, I can see the message contains the build version correctly.
Steve Luo[10/Aug/16 02:21 PM]
I can't reproduce this issue with below example:
msbuild.xml:
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildProperty>$(BuildVersion}</BuildProperty>
</PropertyGroup>
<Target Name="TestMessage" AfterTargets="Build" >
<!--Use $(Property Name) to reference a property-->
<Message Text="Build version is: $(BuildProperty)" Importance="high"/>
</Target>
</Project>
And then I added an environment variable for property BuildProperty in the MSBuild Step:
BuildProperty ${build.version}
from the log, I can see the message contains the build version correctly.
- In the MSBuild step, I added the follow to 'Environment Variables':
Name = Path
Value = C:\<new path to a software>;${node.getAttribute("yourAttributeName")}
- I then list the 'Path' in the Post-Execution Action, but I did not see the new path.
Phong Trinh[10/Aug/16 02:39 PM]
- In the MSBuild step, I added the follow to 'Environment Variables':
Name = Path
Value = C:\<new path to a software>;${node.getAttribute("yourAttributeName")}
- I then list the 'Path' in the Post-Execution Action, but I did not see the new path.
Hi,
You can't use environment variables in the Post-Execution script. The environment variables are only used for QuickBuild to invoke msbuild command.
You have to add the variables manually in your script.
Steve Luo[11/Aug/16 01:38 AM]
Hi,
You can't use environment variables in the Post-Execution script. The environment variables are only used for QuickBuild to invoke msbuild command.
You have to add the variables manually in your script.
msbuild.xml:
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildProperty>$(BuildVersion}</BuildProperty>
</PropertyGroup>
<Target Name="TestMessage" AfterTargets="Build" >
<!--Use $(Property Name) to reference a property-->
<Message Text="Build version is: $(BuildProperty)" Importance="high"/>
</Target>
</Project>
And then I added an environment variable for property BuildProperty in the MSBuild Step:
BuildProperty ${build.version}
from the log, I can see the message contains the build version correctly.