I\'m writing my own MS build scripts which I import in the project file (*.vcxproj)
I would like to execute a task conditionally depending on the C runtime being use
The value you are looking for is metadata of the ClCompile item group. Use this:
Condition=" '%(ClCompile.RuntimeLibrary)' == 'MultiThreadedDll' "
I added this to the bottom of a vcxproj to see what the current setting was:
<Target Name="BeforeClCompile">
<Message Text="BeforeCompile: RuntimeLibrary=[%(ClCompile.RuntimeLibrary)]" Importance="high" />
</Target>