Please read till I state my question clearly. I'm trying to implement a custom msbuild task that will accept a variable number of input parameters from a msbuild script. I am aware of arrays of input parameters in customs tasks
public ITaskItem[] ArrayofItems { get; set; }
These can be declared as follows using either propertygroup/itemgroup
<PropertyGroup>
<Item1>1</Item>
<Item2>2</Item>
<Item3>3</Item>
<Item4>4</Item>
<Item5>5</Item></PropertyGroup>
<ItemGroup>
<File Include="1"></File>
<File Include="2"></File>
<File Include="3"></File>
<File Include="4"></File>
<File Include="5"></File> </ItemGroup>
Then from VS 2010 command line I can set/override the property as following
msbuild somefile.csproj /t:MyTarget /p:Item1=Name1;Item2=Name2...etc
My question is :- Is it possible to declare variable number of propertygroup/itemgroup in the build file so that I can pass in 'n' variable parameters from msbuild command line something like this using propertygroup/itemgroup?
msbuild somefile.csproj /t:MyTarget /p:Item1=Name1;Item2=Name2;ItemN=NameN ('N' Only for illustration purposes)
Is this even possible?
Thanks in advance, Any help will be greatly appreciated.