How can I conditionally include large scripts in my ssdt post deployment script?
<p>In our SSDT project we have a script that is huge and contains a lot of INSERT statements for importing data from an old system. Using sqlcmd variables, I'd like to be able to conditionally include the file into the post deployment script.</p>

<p>We're currently using the <code>:r</code> syntax which includes the script inline:</p>

<pre><code>IF '$(ImportData)' = 'true'
BEGIN
  :r .\Import\OldSystem.sql
END
</code></pre>

<p>This is a problem because the script is being included <strong>inline</strong>  regardless of whether <code>$(ImportData)</code> is true or false and the file is so big that it's slowing the build down by about 15 minutes.</p>

<p>Is there another way to conditionally include this script file so it doesn't slow down the build?</p>