Reputation: 45
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
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
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