-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll' #1318
Comments
@poyadav2001 thanks for bringing this up. Are you accessing the driver inside a library and trying to use that library inside another project? In other words I want to know the architecture of your application and specifically where it uses M.D.S. A sample repro, something with minimal code that can help us to have a better understanding of the issue you are facing with, would be appreciated as well. System.Data.SqlClient is shipped with the framework, hence it has all required dependencies available to itself. However Microsoft.Data.SqlClient is not benefiting from that privilege. |
Link to our repo: https://microsoft.visualstudio.com/Universal%20Store/_git/SC.CST.Dunning |
Hi @poyadav2001 Can you try creating a standalone application using similar architecture and try to run some tests? The SNI DLLs are downloaded transitively to your bin folder when restoring/building the project and project properties can conflict with this transitive loading. If you can reproduce this issue in a standalone app, we can investigate and assist further. That will also give you insights when you compare with a working application to figure out why in a particular project SNI DLLs are not downloading. |
@poyadav2001 is this still an issue? |
Same issue here. Just created VSIX project, added Microsoft.SqlServer.SqlManagementObjects 161.47021.0 and after trying to create connection with DB i get this exception. |
@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. |
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. Update: a workaround seems to be to use System.Data.SqlClient namespace instead which is part of the .NET Framework. |
might be related to #727 I went to add/remove programs and ran repair on it, which fixed the problem |
|
In my case ,I am updating from System.Data.SqlClient to Microsoft.Data.Sqlclient to configure Azure AD Managaed Identity and make my DB connection string password less |
Did you ever figure this out? |
@Sajgoniarz Were you ever able to figure out the VSIX extension issue loading the SNI DLLs? |
After I installed the latest OLE DB driver (19.3.2) it seems to be fixed. Not sure if this is reason. |
Closing as stale, no active known issue or repro available. |
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" />
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
The text was updated successfully, but these errors were encountered: