4

enter image description hereEach time i run my project in VS 2013 i get the following exception

Could not load file or assembly 'Microsoft.VisualStudio.Data.Tools.SqlEditor.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I have tried to run some commands but not getting anywhere. What could be cause and, solution to it. Thanks.

mboko
  • 359
  • 6
  • 16
  • Strange. The message sounds to me like a 32/64 bit issue... – Thorsten Dittmar Mar 30 '15 at 11:15
  • please check this out: http://stackoverflow.com/questions/11370344/could-not-load-file-or-assembly-an-attempt-was-made-to-load-a-program-with-a – demo.b Mar 30 '15 at 11:17
  • I have followed the links you gave me. I checked my Platform target on all the assemblies and they are all set to - Any CPU – mboko Mar 30 '15 at 12:05
  • I encountered this error right after removing a bunch of Microsoft bloatware using [Total Uninstaller](https://github.com/tsasioglu/Total-Uninstaller). If I figure out what I removed that caused this, then I'll try to remember to post an answer here. If this comment helps someone solve their issue, please let us know what you did! – Matt Klein Sep 15 '16 at 21:26

2 Answers2

6

Based on this, Microsoft.VisualStudio.Data.Tools.SqlEditor.dll is installed by Microsoft SQL Server Data Tools, and that is installed by Visual Studio.

Running the Visual Studio installer (from "Add/Remove Programs") and selecting repair reinstalled this missing dependency and now I don't get the error on startup anymore.

Matt Klein
  • 7,856
  • 6
  • 45
  • 46
0

On my machine, I got SSDT as a downloaded extension for Visual Studio (EE). Menu: Extensions, Manage Extensions, search for ssdt.

The files for that extension were downloaded to C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Microsoft\SQLEditor

Visual studio still wasn't looking for it in the right place because my devenv.exe.config wasn't looking in that path. Use notepad to edit C:\Users\[UserName]\AppData\Local\Microsoft\VisualStudio\16.0_d6d04886\devenv.exe.config. The config contained xml element: \configuration\runtime\assemblyBinding\probing:privatePath which seems to contain paths where Visual Studio searches for extensions. I and added "Extensions\Microsoft" to the privatePath attribute. Saved. Restarted Visual Studio 2019 EE.

tgolisch
  • 6,549
  • 3
  • 24
  • 42