MSBuild conditionals depending on task parameters

Posted by jalf on Stack Overflow See other posts from Stack Overflow or by jalf
Published on 2010-04-16T11:40:01Z Indexed on 2010/04/16 11:43 UTC
Read the original article Hit count: 205

Filed under:

In MSBuild it's straightforward to define, say, a PropertyGroup which depends on the value of a property Foo:

<PropertyGroup Conditional="'$(Foo)'=='Bar'" />

Is it also possible for the conditional to depend on a task parameter?

For example, I'd like to use the value of the Link task's SubSystemparameter roughly like this:

<PropertyGroup Conditional="'$(Link/SubSystem)'=='Console'" />

but don't know if it is possible, and if it is, what the correct syntax is.

I'm pretty new to MSBuild though, so it's perfectly possible that I've missed something.

© Stack Overflow or respective owner

Related posts about msbuild