We're using the Sql Server 2012 SSDT which removed the deploy option in Visual Studio for the database projects (now sql projects). We'd like to automate the Publish step as we had for deploy, but it's not clear how to do this. so thA couple of questions:
I've added the .publish.xml to the project (after the first manual publish, checking add to project). Even after that, and setting it to the default, when I double click it, it builds, but always pops up settings window, where I need to click the "Publish" button to continue. Is there a setting that would skip this prompt and use the current values?
It seems that each publish generates a version of the sql output. How can I suppress this- i.e. overwrite the base file each time?
And lastly, any pointers for updating the build to use the new project type and publish command for the automated builds would be appreciated.
A bit late to the party, I admit, but maybe this will help others who stumble across this discussion. My company is presently moving to VS2012 and we have all three of the same issues as Keith. I have found workarounds for #1 and #2.
For #1, I use AutoHotKey to monitor for the existence of the publish window, and automatically click the "Create Script" button. You could of course have the script automatically click the "Publish" button instead. In this example if the publish profile is not "XYZ" (I always prefer manual intervention for production server deployments) then go ahead and send an Alt+G to generate the script.
For #2, every time we publish it increments the filename with a number suffix and we end up with lots of files in our deployment folder. I just used pre-build events to clear out the .sql and .txt files before the build: