The Problem
You create a post deployment script, with a statement like;
[sql]
:r .\Static Data\Insert Seed Values.sql
[/sql]
The system throws an error and will not build:
[csharp][/csharp]
72006: Fatal scripting error: Incorrect syntax was encountered while parsing ‘Data\Insert’
[/chsharp]
The solution
There are two problems:
- The post deployment script does not like spaces in the file paths, so quote the file path in “double quotes”.
[sql]
:r ".\Static Data\Insert Seed Values.sql"
[/sql] - The post deployment script runs in SQL CMD mode, so whilst ever you have the script file open it will throw syntax errors either