Lets say I have two properties in my MSBuild properties file like this:
<Test1>foo1;foo2</Test1>
<Test2>bar;baz</Test2>
Now I want to let MSBuild set the value of a new property with all the combinations of the values of the two lists, like this (actual order in the final list does not matter, as long as all the combinations are there):
<Test>foo1-bar;foo1-baz;foo2-bar;foo2-baz</Test>
How would I do that? Using Linq (C#) it would be as simple as this:
string.Join(';', Test1.Split(';').SelectMany(t1 => Test2.Split(';').Select(t2 => t1 + '-' + t2)));
But Linq cannot be used in MSBuild properties.