Is there a way to get all the metadata keys associated with this element?
I want to do something like the following.
Given:
<ItemGroup> <MyItems Include="item1"> <key1>val1</key1> <key2>val2</key2> <key3>val3</key3> </MyItems> <MyItems Include="item2"> <key4>val4</key4> </MyItems> </ItemGroup>
To be able to determine that item1 has metadata available for key1, key2 and key3, and that item2 has metadata available for key4, not knowing what the names of these keys really are.
In fact, I'm trying to use metadata to indicate attributes that I have no idea about, and then try to figure out a validation method to determine which attributes were specified.
In other words, I believe that the metadata of each element is just a hash containing key / value pairs, and I'm trying to figure out what all the keys are.
Does anyone know how to do this with msbuild?
thanks
source share