title: Cannot open SQL file in T-SQL editor in visual studio 2012
body: <p>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?</p>
  
  <ul>
  <li>I have the most current version of SQL Data Tools installed</li>
  <li>I can connect to a database and open new query in T-SQL Editor and
  run it</li>
  <li>I found the following links with similar issues, but none of them solved my problem.</li>
  </ul>
  
  <p><a href="https://stackoverflow.com/questions/13667165/how-can-i-fix-the-t-sql-editor-in-vs-2012-after-installing-sql-server-2012-sp1">How can I fix the T-SQL editor in VS 2012 after installing SQL Server 2012 SP1?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/14571098/default-to-the-t-sql-pane-view-within-visual-studio-2012-database-project">Default to the T-SQL Pane view within Visual Studio 2012 Database Project</a></p>
  
  <p><a href="http://social.msdn.microsoft.com/forums/vstudio/en-US/3139a20f-f5ae-4333-861a-eec8e38a2f68/cant-load-or-run-a-sql-query-in-vs-2012" rel="nofollow noreferrer">Can't load or run a SQL Query in VS 2012</a></p>
  
  <p>Per request here is the output of the crash.log when I attempt to open an .sql file with T-SQL Editor</p>
  
  <pre><code>&lt;record&gt;582&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.508&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;Entering function CVsPackageInfo::HrInstantiatePackage&lt;/description&gt;
  &lt;guid&gt;{FEF13793-C947-4FB1-B864-C9F0BE9D9CF6}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;583&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.508&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;Begin package load [SqlStudio Editor Package]&lt;/description&gt;
  &lt;guid&gt;{FEF13793-C947-4FB1-B864-C9F0BE9D9CF6}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;584&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.519&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;End package load [SqlStudio Editor Package]&lt;/description&gt;
  &lt;guid&gt;{FEF13793-C947-4FB1-B864-C9F0BE9D9CF6}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;585&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.662&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;Entering function CVsPackageInfo::HrInstantiatePackage&lt;/description&gt;
  &lt;guid&gt;{ED19932F-5443-4587-A005-1CB9158B2F64}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;586&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.662&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;Begin package load [SQL Language Services Package]&lt;/description&gt;
  &lt;guid&gt;{ED19932F-5443-4587-A005-1CB9158B2F64}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;587&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.681&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;End package load [SQL Language Services Package]&lt;/description&gt;
  &lt;guid&gt;{ED19932F-5443-4587-A005-1CB9158B2F64}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;588&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.843&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;Entering function CVsPackageInfo::HrInstantiatePackage&lt;/description&gt;
  &lt;guid&gt;{0B680757-2C29-4531-80FA-535A5178AA98}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;589&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.843&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;Begin package load [Visual Studio Code Snippets Package]&lt;/description&gt;
  &lt;guid&gt;{0B680757-2C29-4531-80FA-535A5178AA98}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;590&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:08.843&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;End package load [Visual Studio Code Snippets Package]&lt;/description&gt;
  &lt;guid&gt;{0B680757-2C29-4531-80FA-535A5178AA98}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;591&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:09.131&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;Entering function CVsPackageInfo::HrInstantiatePackage&lt;/description&gt;
  &lt;guid&gt;{9A62B3CA-5BDF-47CB-A406-3CEB946F1DDF}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;592&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:09.132&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;Begin package load [SqlStudio Debugger Package]&lt;/description&gt;
  &lt;guid&gt;{9A62B3CA-5BDF-47CB-A406-3CEB946F1DDF}&lt;/guid&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;record&gt;593&lt;/record&gt;
  &lt;time&gt;2014/09/26 21:12:09.140&lt;/time&gt;
  &lt;type&gt;Information&lt;/type&gt;
  &lt;source&gt;VisualStudio&lt;/source&gt;
  &lt;description&gt;End package load [SqlStudio Debugger Package]&lt;/description&gt;
  &lt;guid&gt;{9A62B3CA-5BDF-47CB-A406-3CEB946F1DDF}&lt;/guid&gt;
  &lt;/entry&gt;
  </code></pre>
  
  <p></p>