Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBuild Item order when using wildcards

Tags:

msbuild

When creating MSBuild Items from files using wildcards, such as,

<ItemGroup>
  <Scripts>$(ScriptsDirectory)\**\*.sql</Scripts>
</ItemGroup>

the files seem to always be sorted alphabetically by path.

However, is this sort order guaranteed - can I rely on it?

like image 931
Thomas Boussard Avatar asked Aug 13 '11 12:08

Thomas Boussard


1 Answers

Yes, MSBuild will always sort alphabetically by path, in order to guarantee repeatability. (This is covered in my new book, "MSBuild Trickery")

like image 85
Brian Kretzler Avatar answered Nov 15 '22 08:11

Brian Kretzler