Is there a way to get the value of a property from msbuild?

Viewed 432

If I use the command line to run msbuild like this: msbuild myproject.dproj /t:Clean;Build /p:Config=Release /p:Platform=Win32 is there a way for the command line to get the value of where the actual exe of that command will be?

1 Answers

You should write a custom target to get that value.

First, add this target into the myproject.dproj

<Target Name="GetOutputValue">  
<Message Importance="high" Text="$(DCC_ExeOutput)"></Message>
</Target>

Then, directly use this command to invoke the GetOutputValue target to get that value.

msbuild myproject.dproj /t:GetOutputValue

enter image description here

Related