How to deploy a Database Project with Team Build 2010

by Donovan Brown 6. September 2010 19:17

Problem:

I need to deploy a database project during a Team Build.

Solution:

Edit the dbproj file to include the Deploy target.

Explanation:

  1. Open the solution that contains the desired database project. 
  2. Right click on the database project and select properties. 
  3. 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. 
  4. 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". 
  5. 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. 
  6. Update the DefaultTargets attribute of the Project element to "Build;Deploy". 
  7. Save and close the file then right click the database project and select "Reload Project". 
  8. Check in your database project.
  9. Queue your build. Your database will be built and deployed.

Tags: , ,

About the author

My name is Donovan Brown and I am a process consultant for Imaginet with a background in application development.  I also run one of the Nation’s fastest growing online registration sites for motorsports events DLBRacing.com.  When I am not writing software I race cars for fun.  DLBRacing.com has given me the opportunity to combine my two passions writing software and racing cars.

AdSense

Month List

AdSense