开发者

Why don't post-deployment scripts run in VS2008 database projects?

开发者 https://www.devze.com 2022-12-10 23:33 出处:网络
I\'ve got a VS2008 database project, and I created a post-deployment script under 开发者_运维知识库Scripts > Post-Deployment, but it appears to be a no-op (even when I put syntax errors into the file,

I've got a VS2008 database project, and I created a post-deployment script under 开发者_运维知识库Scripts > Post-Deployment, but it appears to be a no-op (even when I put syntax errors into the file, everything succeeds). The rest of the database deployment succeeds though (and it does create my tables). Any clues?


It sounds like you're just placing scripts in your post-deployment directory. You actually need to include them in your Script.PostDeployment.sql file. For example:

:r .\MyScriptName.sql
:r .\MySecondScript.sql

Not every script in the Post-Deployment folder just runs by default; in fact, only one can. By default, it's that Script.PostDeployment.sql file. You can change it if you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消