When working with a Database Project in Visual Studio 2012, VS defaults to the "Design-View" pane when you add or edit a table. While you can work in split-screen mode, the T-SQL pane defaults to the bottom pane.
As I prefer to work with T-SQL directly as opposed to the designer, I constantly am switching to make the T-SQL pane the top-most editor in order to work with the object. Unfortunately, VS does not remember this preference, so each and every time I work with a table I must change to make the T-SQL pane appear on top as opposed to beneath the designer pane.
I've looked to see if there is a setting under Tools --> Options to control this behavior, but so far I have been unable to find a setting that does so. I've done a few google searches on the topic as well, but haven't found anything helpful for this particular case.
This is more of an annoyance than anything else for me, but as I am finding myself constantly switching panes I wonder if anyone knows of a setting, either within VS or the registry or some other config file that would force VS to either remember my preference or default to the T-SQL Pane on top of the Designer Pane?
If you want to get rid of the designer completely, try the following:
- Right-click on the file, and select Open With...
- Then select Microsoft SQL Server Data Tools, T-SQL Editor,
- Click on Set as Default
- Click OK.
Next time you should be able to simply double clicking the file to open it in T-SQL.
来源:https://stackoverflow.com/questions/14571098/default-to-the-t-sql-pane-view-within-visual-studio-2012-database-project