Blog Home  Home Feed your aggregator (RSS 2.0)  
Accentient - DeployToDatabaseAddToServerExplorer
Visual Studio ALM Experts
 
# Monday, October 19, 2009

I’ve been doing a lot of work with the Database, er Development edition of VSTS 2008. Of course I’m running the GDR-R2 version which really changed the architecture of the database projects, as well as the process of building and deploying.

Prior to the GDR, if you deployed a database project it would automatically create a Data Connection in the Server Explorer window. I liked this, because I would almost always follow-up a first time deployment with some data generation or unit testing, and it just made it easier to select the pre-defined connection from the dropdowns. It seems that the GDR erased this timesaver.

 

For example, I just deployed a GDR-R2 database project according to these settings:

 

image

 

And when I go to the Server Explorer window, I don’t see my VSTS\dev.AdventureWorks2009.dbo connection like I would have expected:

 

clip_image002

 

Well it seems that this change was by design and it is configurable! According to Duke Kamstra, there’s a property in the database project (.dbproj) file that lets you control this behavior:

 

<DeployToDatabaseAddToServerExplorer>False</DeployToDatabaseAddToServerExplorer>

 

If you set the property to True, the connection will get added to the list which Server Explorer displays, and the behavior I enjoyed prior to GDR will return. For added coolness, if you always want this behavior you could modify the template(s) that are instantiate dbproj file(s) from: C:\Program Files\Microsoft Visual Studio [9.0 | 10.0]\VSTSDB\Extensions\SqlServer\ProjectItems\*\*.dbproj

 

Duke also tells me that the same property exists in Visual Studio 2010.

Monday, October 19, 2009 2:31:53 PM (Mountain Daylight Time, UTC-06:00)  #    Comments [0]   Development | SQL Server | Visual Studio 2010  | 
Copyright © 2012 Richard Hundhausen. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: