0

I have added an sql file to a project in visual studio 2012. I can open with Source Code (Text) Editor and view the contents of the file. What I think I should be able to do, is open the file in Microsoft SQL Server Data Tools, T-SQL Editor. When I do this either visual studio forces a restart or the cursor spins for a while but the file is not opened. I would like to be able to open an sql file in the T-SQL Editor in visual studio 2012 is that too much to ask microsoft? What am I doing wrong?

  • I have the most current version of SQL Data Tools installed
  • I can connect to a database and open new query in T-SQL Editor and run it
  • I found the following links with similar issues, but none of them solved my problem.

How can I fix the T-SQL editor in VS 2012 after installing SQL Server 2012 SP1?

Default to the T-SQL Pane view within Visual Studio 2012 Database Project

Can't load or run a SQL Query in VS 2012

Per request here is the output of the crash.log when I attempt to open an .sql file with T-SQL Editor

<record>582</record>
<time>2014/09/26 21:12:08.508</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{FEF13793-C947-4FB1-B864-C9F0BE9D9CF6}</guid>
</entry>
<entry>
<record>583</record>
<time>2014/09/26 21:12:08.508</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [SqlStudio Editor Package]</description>
<guid>{FEF13793-C947-4FB1-B864-C9F0BE9D9CF6}</guid>
</entry>
<entry>
<record>584</record>
<time>2014/09/26 21:12:08.519</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [SqlStudio Editor Package]</description>
<guid>{FEF13793-C947-4FB1-B864-C9F0BE9D9CF6}</guid>
</entry>
<entry>
<record>585</record>
<time>2014/09/26 21:12:08.662</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{ED19932F-5443-4587-A005-1CB9158B2F64}</guid>
</entry>
<entry>
<record>586</record>
<time>2014/09/26 21:12:08.662</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [SQL Language Services Package]</description>
<guid>{ED19932F-5443-4587-A005-1CB9158B2F64}</guid>
</entry>
<entry>
<record>587</record>
<time>2014/09/26 21:12:08.681</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [SQL Language Services Package]</description>
<guid>{ED19932F-5443-4587-A005-1CB9158B2F64}</guid>
</entry>
<entry>
<record>588</record>
<time>2014/09/26 21:12:08.843</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{0B680757-2C29-4531-80FA-535A5178AA98}</guid>
</entry>
<entry>
<record>589</record>
<time>2014/09/26 21:12:08.843</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Visual Studio Code Snippets Package]</description>
<guid>{0B680757-2C29-4531-80FA-535A5178AA98}</guid>
</entry>
<entry>
<record>590</record>
<time>2014/09/26 21:12:08.843</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [Visual Studio Code Snippets Package]</description>
<guid>{0B680757-2C29-4531-80FA-535A5178AA98}</guid>
</entry>
<entry>
<record>591</record>
<time>2014/09/26 21:12:09.131</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{9A62B3CA-5BDF-47CB-A406-3CEB946F1DDF}</guid>
</entry>
<entry>
<record>592</record>
<time>2014/09/26 21:12:09.132</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [SqlStudio Debugger Package]</description>
<guid>{9A62B3CA-5BDF-47CB-A406-3CEB946F1DDF}</guid>
</entry>
<entry>
<record>593</record>
<time>2014/09/26 21:12:09.140</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [SqlStudio Debugger Package]</description>
<guid>{9A62B3CA-5BDF-47CB-A406-3CEB946F1DDF}</guid>
</entry>

Community
  • 1
  • 1
kpublic
  • 1
  • 2
  • Can you run `devenv /log crash.log` and see if there is something logged that help identify the issue? Does it repro when you run `devenv /SafeMode`? Add the results to your question by clicking [edit] .... – rene Sep 26 '14 at 15:45
  • How or where do I run that command? Do I need to run the visual studio command line to do that? – kpublic Sep 26 '14 at 20:07
  • yes, open the visual studio command prompt. Make sure to put the crash.log file on a path you can write to. And don't paste the complete log, it can be rather large... just pick the lines that are suspiscous – rene Sep 26 '14 at 20:08

1 Answers1

0

I had to download and install
SSDT for Visual Studio (VS) 2012
Here is the link to the page, if it is broken just search for "sql server data tools 2012".

Here is the link to the download SSDT_11.0.50730.0_EN.iso

NOTE Do not install Business Solutions

Steps

  1. Close Visual Studio 2012
  2. Download and install SSDT_11.0.50730.0_EN.iso
    a. Double click the .iso and then double click SSDTSETUP.EXT
    b. Check "I agree..." and Install
    enter image description here
  3. On the Setup Successful screen click Close
    enter image description here
  4. Restart computer
  5. Open Visual Studio 2012
  6. Right-Click a .sql file
    a. Click Open with...
    enter image description here
    b. Choose Microsoft SQL Server Data Tools, T-SQL Editor
    c. Click the Set as Default button
    d. Click OK
Mark Davich
  • 512
  • 1
  • 5
  • 16