Skip to content

Instantly share code, notes, and snippets.

@scott4dev
Forked from anonymous/run_all_sql_scripts.bat
Created March 16, 2011 09:55
Show Gist options
  • Save scott4dev/872255 to your computer and use it in GitHub Desktop.
Save scott4dev/872255 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5"
DefaultTargets="main"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks"/>
<Target Name="createdb">
<ItemGroup>
<SqlFiles Include="$(MSBuildProjectDirectory)\db\**\*.sql" />
</ItemGroup>
<Message Text="SqlFiles: $(MSBuildProjectDirectory)\db\**\*.sql"></Message>
<SqlCmd TaskAction="Execute" Server="."
SeverityLevel="1" InputFiles="@(SqlFiles)"
QueryTimeOut="10" />
</Target>
</Project>
msbuild build.proj /t:createdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment