I have a numer, "n" in a property in MSBuild. I also have a string "Str" that needs to be duplicated n-times to achieve a final string that is the repetition of "Str" n times.
Eg. If n is 3 and Str is "abc", what I want to obtain is "abcabcabc"
Since one cannot loop in MSBuild, I don't know how to achieve this. Perhaps with an item group, but how do I create one based on a property containing an "n" count?
Thanks!
To create a String repeated n times, you can also do this (at least in MSBuild Tools v4.0):
usually for things like this I resolve to using inline C#, as it costs me less time than searching all over the internet to find a 'true' msbuild solution; here you go: