Srinivas
Srinivas

Reputation: 45

Stored Procedure changes not reflecting in dacpac script

I have added a new stored procedure and added it to my sqlproj file. But when I generate script to publish my database, the changes are not getting reflected in the generated script.

Upvotes: 3

Views: 3974

Answers (2)

NitinSingh
NitinSingh

Reputation: 2068

For a stored procedure, following lines must not be there

IF EXISTS (...

    DROP PROCEDURE ..

Once these lines are removed, set the build action to "Build" and Copy To Output = None

The procedure will then be included in the build script

Upvotes: 1

sburgess123
sburgess123

Reputation: 332

Have a look at the 'Build Action' property of the sql script in the solution explorer..check that its not set to 'None' - from memory it needs to be set to 'Build'

Upvotes: 10

Related Questions