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?
Yes, MSBuild will always sort alphabetically by path, in order to guarantee repeatability. (This is covered in my new book, “MSBuild Trickery”)