2 tasks inside a msbuild loop -


i'm trying achieve this:

<itemgroup>        <projects include="projectpath1"/>        <projects include="projectpath2"/>        ... <itemgroup/>  // foreach project { <getcss project=%project.identity cssoutputs=@cssfiles/> <mergecss cssinputs=@cssfiles cssoutputfile="test.css"/>  // } execute getcss mergecss foreach project  

getcss , mergecss custom inline tasks.

i don't want:

// foreach project {     <getcss project=%project.identity cssoutputs=@cssfiles/> // } // foreach project {     <mergecss cssinputs=@cssfiles cssoutputfile="test.css"/>   // } 

thanks in advance help.

based on code, looks you'd want perform target batching call both of inline tasks each of projects items. here's example of batched target named getandmergecss, assumption getcss inline task takes string input , cssfiles listed cssouputs msbuild items consumed mergecss inline task:

<itemgroup>   <projects include="projectpath1"/>   <projects include="projectpath2"/> </itemgroup>  <target name="getandmergecss" outputs="%(projects.identity)">    <propertygroup>     <thisprojectidentity>%(projects.identity)</thisprojectidentity>   </propertygroup>    <message text="preparing , merge css project:  $(thisprojectidentity)" />    <getcss project="$(thisprojectidentity)" cssoutputs="@(cssfiles)"/>   <!--or works too...<getcss project="%(projects.identity)" cssoutputs="@(cssfiles)"/>-->    <mergecss cssinputs="@(cssfiles)" cssoutputfile="test.css"/>  </target> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -