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.
Asked
Active
Viewed 3,603 times
2 Answers
10
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'

sburgess123
- 332
- 2
- 10
1
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

NitinSingh
- 2,029
- 1
- 15
- 33