We are having x, y ,z properties files and having a master.properties file
Now , i have written in my master.properties file some itemgroup like follows and pass this itemgroup to msbuild target so that it will work like foreach.
Item group:
<Components Include="Y:\Build\X.Properties">
<ComponentName>X</ComponentName>
</Components>
<Components Include="Y:\Build\Y.Properties">
<ComponentName>Y</ComponentName>
</Components>
<Components Include="Y:\Build\Z.Properties">
<ComponentName>Z</ComponentName>
</Components>
<Target Name="BuildAll" Inputs="@(Components)" Outputs="%(Identity).Dummy">
<MSBuild Projects="@(Components)"
Targets="BuildComponent" />
</Target>
Now I want to have a txt file where component names will be given like this
X Y
it should build only X and Y alone.
I was trying with ReadLinesFromFile , but i am not able to pass one by one component.
For ex:
<ReadLinesFromFile File="Allcomponent.txt">
<Output TaskParameter="Lines" ItemName="AllComponent" />
</ReadLinesFromFile>
Then I want to pass component in the itemgroup one by one to call Msbuild tasks.
How to solve this?