Skip to content
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

Dependency problem while using Microsoft.Data.SqlClient #329

Open
ruby3141 opened this issue Feb 15, 2024 · 0 comments
Open

Dependency problem while using Microsoft.Data.SqlClient #329

ruby3141 opened this issue Feb 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ruby3141
Copy link

Version

C# REPL 0.6.6+ba21d409af4dce77f8be07f6a61cdb24cd19bb29

What happened?

Tried to use Microsoft.Data.SqlClient and this happened;

> #r "nuget:Microsoft.Data.SqlClient"
'' not found for package System.Text.Encodings.Web.4.7.2
'' not found for package System.Text.Json.4.6.0
'' not found for package System.Text.Encodings.Web.4.7.2
'' not found for package System.Runtime.CompilerServices.Unsafe.4.7.1
'' not found for package System.Text.Encodings.Web.4.7.1
'' not found for package Microsoft.IdentityModel.Abstractions.6.22.0
'' not found for package System.Buffers.4.5.1
'' not found for package System.Buffers.4.5.1
'' not found for package System.Numerics.Vectors.4.4.0
'' not found for package System.Security.AccessControl.5.0.0
'' not found for package System.Security.Cryptography.ProtectedData.4.5.0
'' not found for package System.Security.Cryptography.ProtectedData.4.7.0
'' not found for package System.Security.Cryptography.Cng.4.5.0
'' not found for package System.Text.Encodings.Web.4.7.2
'' not found for package System.Configuration.ConfigurationManager.6.0.0
'' not found for package System.Buffers.4.5.1
Package 'Microsoft.Data.SqlClient.5.1.5' was successfully installed.

That doesn't look like successful install, but I tried using it to make sure.

> using Microsoft.Data.SqlClient;
> var conn = new SqlConnection();
> conn.ConnectionString = "Encrypt=True;Trust Server Certificate=True;{Redacted Credentials}";
> Exception ex;
> try
  {
      conn.Open();
  }
  catch (Exception e)
  {
      ex = e;
  }
> ex
The type initializer for 'Microsoft.Data.SqlClient.TdsParser' threw an exception.
> ex.InnerException
The type initializer for 'Microsoft.Data.SqlClient.SNILoadHandle' threw an exception.
> ex.InnerException.InnerException
Unable to load DLL 'Microsoft.Data.SqlClient.SNI.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)

Tried installing Microsoft.Data.SqlClient.SNI from nuget, but it didn't help.

> #r "nuget:Microsoft.Data.SqlClient.SNI.runtime"
No applicable references were found inside 'Microsoft.Data.SqlClient.SNI.runtime.5.1.1' package.
@ruby3141 ruby3141 added the bug Something isn't working label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants