Remove operations prior to a CREATE statement when linking to .sqlproj files
I'm linking to an existing database using a local folder. The database is linked in shared mode.
The local folder was built by SSDT and contains a .sqlproj file. I'm notified of the beta functionality when linking, so I know SQL Source Control identifies the project as linking to SSDT.
When I add a stored procedure, the resulting script starts with:
SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
These statements don't compile in SSDT. The first statement in each script must be a create statement.
I had removed these lines from the statement that I ran against SQL Server to create the procedure initially. After performing a commit, those statements are added in the resulting .sql script file.
I checked the stored procedure using OBJECT_DEFINITION(object_id) and find that those SET statements are not in the definition on the server. This indicates that SQL Source Control is adding those lines to the script.
Please enable a way to prevent adding those lines. SSDT raises SQL70001 errors "The statement is not recognized in this context" as a result of those statements.
Sorry if this is a duplicate request.