I want to create an "ItemGroup" of arbitrary strings / names in order to use MSBuild transforms, for example:
<ItemGroup>
<Categories>First</Categories>
<Categories>Second</Categories>
</ItemGroup>
I then wish to pass a transform of these categories into a console app, e.g.:
/c @(Categories, ' /c ')
The reason why I say "ItemGroup" in quotes, is because I'm not sure whether or not it is applicable for me to use ItemGroups in this way - as far as I can see nothing in the documentation states that ItemGroups must be files, however using the above results in an error message due to missing mandatory "Include" attribute.
- Is there a way of doing the above using ItemGroups?
- Alternatively is there a better way of achieving the above without using ItemGroups?