Not sure why this was hard, but I wanted to make a trivial command file to deploy my database (or any change to it). For those of you that don’t know the DataDude project, I have to say it’s one of the coolest tools that has come out the Microsoft Visual Studio Team for a while. Basically, in a nutshell, what it does is split’s your database into hundreds of little files. One for each table, key, foreign key, user, role, etc. Then, since it is a standard VS2008 project, you can keep those files and the project under source control. The big benefit is that multiple team members can change files and check them in, and everyone’s schema is kept up to date.
So, how does the up to date work? the way it works is when you get the latest from your version control, you simply right click on the vs2008 project and say “Deploy”.
It’s kind of a hassle though because you have to open the project first, the don this.
Here is a simple one line cmd file that you can use to do this task for you.
C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /t:Deploy /p:Configuration="Debug";Platform="Any CPU" /v:normal /m "data\ThreePLogicDatabase\ThreePLogicDatabase.dbproj" pause
That’s it! hope this helps.