Add support for the full folder structure from Database Projects into SSDT - by Mark Freeman

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 775510 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 12/31/2012 11:23:50 AM
Access Restriction Public


I invoked Project | Import | Script, selected a .sql file that I had exported from DTA, but found no override option. (See note regarding this missing UI element from Gert Drapers in Although there is a drop down for "Folder Structure", the option "Schema\Object Type" does not do what I am used to from Database Projects.

Instead of creating new files under Schema Objects\Tables\Statistics, it appended the CREATE STATISTICS statements to the existing CREATE TABLE scripts in Schema Objects\Tables. Just as I don't want the constraints and keys in my table definition, I don't want the statistics there either. This creates inconsistencies with the way that the project scripts were created and maintained in the Database Projects before SSDT "replaced" those. If I want to look in my source code to find the statistics, I don't want to have to open each CREATE TABLE script. I want to be able to expand the Schema Objects\Tables\Statistics tree in Solution Explorer.

When SSDT "upgraded" my Database Projects, it did not consolidate the existing Constraints, Keys, or Statistics scripts into the Tables scripts. It is therefore unexpected that the Schema Comparison and Import Scripts executions only update Tables scripts and do not create or maintain the more specific script types. 

Meanwhile, I am not looking forward to having to create around 100 CREATE statistics scripts without assistance from a tool. I realize that I can write my own Powershell script to parse the DTA-produced .sql file into individual CREATE STATISTICS scripts, then use "Add Items to Folder" in Source Control Explorer, and add use "Add Existing Item..." to add them to my Project, but this seems like a lot of work that should be done for me. And the Database Projects feature that SSDT superseded used to do all that for me.
Sign in to post a comment.
Posted by dejann on 7/17/2013 at 10:20 PM
This is a major annoyance. Creating objects in SQL Object Explorer creates them in root project folder in Solution Explorer. But when import is used, folder structures are created.
This is inconsistent.
Also, having a standardized folder structure is a great feature. It was working well in VS 2010, why partially remove it in 2012?
Posted by Microsoft on 1/17/2013 at 10:46 AM
Thank you for the input. We will consider this for a future version of SSDT.