Visual Studio 2012 - Database Project - setting a default profile for publish
Asked Answered
C

4

26

Just wondering if anyone knows how to set a saved publish profile as the default i.e. profile that's automatically loaded when I select publish. I love the new profile approach but I'm a bit over having to reselect the same profile over and over while I'm developing.

Chaworth answered 22/3, 2013 at 9:52 Comment(0)
C
9

So I've just discovered how to do this, right click on the specific .xml file (e.g. Debug.publish.xml) that you wish to publish and it is automatically loaded into the Publish panel.

Double clicking the XML file also works

The latest Visual Studio 2012 Updates also now include right click options for:

1 - Set as default
2 - Publish

Chaworth answered 2/4, 2013 at 10:28 Comment(0)
U
23

In VS2012 and up, you can set the Default Publish Profile by right-clicking on the .xml profile file and clicking the Set As Default Publish Profile option. It will then be auto-loaded when you click to Publish the project.

Unexceptionable answered 19/4, 2013 at 22:1 Comment(2)
Any way to make this "stick" in source control?Pratique
This is (unfortunately) no longer relevant in Visual Studio 2019.Shrieval
C
9

So I've just discovered how to do this, right click on the specific .xml file (e.g. Debug.publish.xml) that you wish to publish and it is automatically loaded into the Publish panel.

Double clicking the XML file also works

The latest Visual Studio 2012 Updates also now include right click options for:

1 - Set as default
2 - Publish

Chaworth answered 2/4, 2013 at 10:28 Comment(0)
C
2

Rob, you may want to consider setting up some batch files that call SQLPackage to use your desired Publish profile. I blogged about it here: http://schottsql.blogspot.com/2012/11/ssdt-publishing-your-project.html

For our dev team, we have a set of batch files set up that can build one or all databases locally from whatever branch they're currently using. That makes it a lot easier to update the local database. The "Publish All" batch file takes a little time to run but is still better than opening each project individually to publish the databases.

Cholecyst answered 7/5, 2013 at 16:57 Comment(0)
T
0

Slightly odd issue: I renamed my .xml file to .localdev.xml....file name is "double extension'd" - VS/Datatools looks for ".publish.xml" NOT just the .xml file. In my case I needed "*.localdev.publish.xml". When it had the wrong name the "Set as Default Publish Profile" right click option DID NOT show up, nor did double-clicking...where is Molder when you need him?!?!? ;)

Get the name right, get the right functionality......MS needs better, more creative QA people!! ;)

Thoroughgoing answered 15/1, 2016 at 23:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.