Sorted ItemGroup RRS feed

  • Question

  • I'm using an ItemGroup to select several Sql-Scripts. Then I want to execute them. Execution works fine, but the problem is, that I have to execute them in a specified order ('cause of dependencies). For this case we made a naming-convention - so all I need is a possibility to sort the selected files in the ItemGroup by name - is this possible?

    Here's my ItemGroup:

    <SqlFiles Include="$(MSBuildProjectDirectory)\Core\Redirector\RedirectorDB\**\*.sql;$(MSBuildProjectDirectory)\Core\RangeManager\RMDb\**\*.sql;$(MSBuildProjectDirectory)\Core\UserManager\UMRedirectorDB\**\*.sql;$(MSBuildProjectDirectory)\Core\AdminWeb\AWRedirectorDb\**\*.sql">
            <SqlFiles Include="$(MSBuildProjectDirectory)\Core\UserManager\UmDb\**\*.sql">
            <SqlFiles Include="$(MSBuildProjectDirectory)\Core\ProviderManager\PmDb\**\*.sql">
            <SqlFiles Include="$(MSBuildProjectDirectory)\Core\AdminWeb\AWMobileDistributor\**\*.sql">

    Friday, September 8, 2006 3:28 PM


  • As far as I know, you cannot do this out of the box, so I'd suggest writing a custom task, and in this case the task itself should be trivial to write.
    Monday, September 11, 2006 1:41 PM