Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll'

See original GitHub issue

Describe the bug

A clear and concise description of what the bug is. {“Unable to load DLL ‘Microsoft.Data.SqlClient.SNI.x64.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)”}

To reproduce

Updated project that targets .NET Framework 4.7.2 to use Microsoft.Data.SqlClient from System.Data. SqlClient. Cannot find the Microsoft.Data.SqlClient.SNI.x64.dll under bin folder. The dll is not automatically added by Microsoft.Data.SqlClient <PackageReference Include="Microsoft.Data.SqlClient" Version="3.0.0" />

image

Further technical details

Microsoft.Data.SqlClient version: (found on the nuget or Microsoft.Data.SqlClient.dll) : 3.0.0 .NET target: (e.g. Framework 4.7.1, Core 2.2.2) .NET Framework 4.7.2 SQL Server version: (e.g. SQL Server 2017) Operating system: (e.g. Windows 2019, Ubuntu 18.04, macOS 10.13, Docker container) Windows 2019

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
kristianjaegercommented, Jun 8, 2022

I just repro-ed this today with Nuget Microsoft.Data.SqlClient 4.1.0 and the implicitly installed Microsoft.Data.SqlClient.SNI dependency of 4.0.0. This is using .NET Framework 4.7.2 on Windows 2016 Datacenter. "Exception": "System.DllNotFoundException: Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).
The files are included in a VisualStudio build (2019) but not Octopus package for some reason.

Update: a workaround seems to be to use System.Data.SqlClient namespace instead which is part of the .NET Framework.

2reactions
ErikEJcommented, Jun 4, 2022

@Sajgoniarz hardly same issue, as a vsix is a dll file hosted and loaded in the Visual Studio process. Suggest you create a new issue with reproduction details or even better a sample project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll'
I have two published environment, Staging and one for live. my published project works in test env. without any issue, but as soon...
Read more >
Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll'
Please try to Nuget package update Microsoft. · Double check your application configuration (if using IIS, that you're actually running as a web ......
Read more >
Solved: Add-in fails with "The specified module could not
Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).
Read more >
Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x86.dll'
Resolution · Completely uninstall SSMS 19. Prior to that, make a backup of any user preferences · Reboot the computer · Install again...
Read more >
Re: Microsoft.Data.SqlClient custom action fails to load ...
Data.SqlClient issue. The problem is that it has a dependency on a native SNI DLL. It isn't an assembly and can't be loaded...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found