How to batch in MSBuild? -


i can't figure out how pass values msbuild task method. take following project file...

<project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" toolsversion="4.0" defaulttargets="main"> <propertygroup>     <var1>foo</var1>     <var2>bar</var2> </propertygroup>  <target name="main">     <message text="$(var1)" importance="high" />     <message text="$(var2)" importance="high" /> </target>    </project> 

i want refactor message task target , pass on var1 , var2 same output. simplified example concept same.

i think want this:

<itemgroup>   <messages include="message1">     <text>hello message1</text>   </messages>   <messages include="message2">     <text>hello message2</text>   </messages> </itemgroup>  <target name="testmessage">   <message text="%(messages.text)"/> </target> 

this produces following output:

testmessage:   hello message1   hello message2 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -