Reputation: 359
Each 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.
Upvotes: 4
Views: 4112
Reputation: 6744
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.
Upvotes: 0
Reputation: 8424
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.
Upvotes: 6