- Open the solution that contains the desired database project.
- Right click on the database project and select properties.
- Click the Deploy tab and verify the Deploy Action is set to "Create a deployment script (.sql) and deploy to the database, and the Target Database Settings are correct.
- Now we need to update the .dbproj file to include the Deploy target. From the Solution Explorer right click the database project and select "Unload Project".
- Right click on the database project and select "Edit [database].dbproj" where [database] equals the name of your database project. This will open the .dbproj with an XML editor.
- Update the DefaultTargets attribute of the Project element to "Build;Deploy".
- Save and close the file then right click the database project and select "Reload Project".
- Check in Build Output path, in this path single database deployment script will be created.
- Build your project to verify the script.
Monday, April 2, 2012
Create a Single Database deployment script from the dbproj in Visual Studio
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment