2

For a sql script file in a database project, is there anything to be gained by using a Build Action of Build or Compile? I usually just use None, but wonder if Build or Compile do anything for a sql script e.g. perhaps some sort of additional syntax checking?

(We use our own custom deployment for scripts, so deployment options are not required.)

3 Answers 3

4

When performing a schema compare, only .sql files with their build action set to Build are included.

Sign up to request clarification or add additional context in comments.

Comments

3

If you are building the project, creating a dacpac and then using sqlpackage.exe to deploy the dacpac to the server. Then setting the build action to none on a script will ensure that the script is not included in the update to the server. It give you8 a way to control what updates are carried out thru this tooling.

Comments

2

Nope, there is nothing to compile, just use None...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.