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
M2 Parallels Failed to load dll 'Microsoft.Data.SqlClient.SNI.arm64.dll' #2389
Comments
@AzmogEx is this happening on just a simple Open command? |
same issue |
@hhhhrh Currently I'm using text messages to do this while I wait for the issue to be resolved. |
@AzmogEx can you provide a simple repro including connection string properties and csproj please? |
@AzmogEx can you check the bin folder to see if the file is copied to that folder? |
Also you can use AppContext.SetSwitch to eliminate use of native dll and use managed SNI on your device to see if that solves the issue for you. |
I can replicate using Windows 11 Pro on ARM (on Parallels on a MacBook M3): On Windows 11 running in Parallels on Mac...
However this works... <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
</ItemGroup>
</Project> using Microsoft.Data.SqlClient;
var connectionString = "Server=tcp:fbmacbook.local;" + // fails to connect if IP address is used
"Initial Catalog=master;User ID=sa;Password=password;" +
"Encrypt=False;";
using (var connection = new SqlConnection(connectionString))
{
connection.Open();
Console.WriteLine("Connected to SQL Server");
} SQL Server is running in a Docker container with emulation. |
Yes i have the same problem
Le jeu. 14 mars 2024 à 19:04, Frank Buckley ***@***.***> a
écrit :
… I can replicate using Windows 11 Pro on ARM (on Parallels on a MacBook M3):
On Windows 11 running in Parallels on Mac...
- Open Visual Studio 2022 (17.9.3)
- View SQL Server Object Explorer
- Connect - fill in database IP address and port, use SQL
authentication
- Click Connect - nothing happens
- Click dropdown for databases
image.png (view on web)
<https://github.com/dotnet/SqlClient/assets/5655810/58852257-c814-47b4-9fba-8bb116dfa631>
*However* this works...
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
</ItemGroup>
</Project>
using Microsoft.Data.SqlClient;
var connectionString = "Server=tcp:fbmacbook.local;" + // fails to connect if IP address is used
"Initial Catalog=master;User ID=sa;Password=password;" +
"Encrypt=False;";
using (var connection = new SqlConnection(connectionString))
{
connection.Open();
Console.WriteLine("Connected to SQL Server");
}
SQL Server is running in a Docker container with emulation.
—
Reply to this email directly, view it on GitHub
<#2389 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATH2EZGJXYJZ3BZUPO3IENTYYHRDFAVCNFSM6AAAAABEHY47IGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGAZTQNBTGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello
I am on Mac M2 with parallels and I use sql server and visual studio 2022 but I have a dll problem when I try to connect to a sql server
Failed to load DLL 'Microsoft.Data.SqlClient.SNI.arm64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) (Microsoft.Data.SqlClient)
====================================
Failed to load DLL 'Microsoft.Data.SqlClient.SNI.arm64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) (Microsoft.Data.SqlClient)
Program Location:
at Microsoft.Data.SqlClient.SNINativeManagedWrapperARM64.UnmanagedIsTokenRestricted(IntPtr token, Boolean& isRestricted)
at Microsoft.Data.SqlClient.SNINativeMethodWrapper.UnmanagedIsTokenRestricted(IntPtr token, Boolean& isRestricted)
at Microsoft.Data.Win32NativeMethods.IsTokenRestrictedWrapper(IntPtr token)
at Microsoft.Data.ProviderBase.DbConnectionPoolIdentity.GetCurrent()
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource
1 retry, DbConnectionOptions userOptions)at Microsoft.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource
1 retry) at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource
1 retry, SqlConnectionOverrides overrides)at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)
at Microsoft.SqlServer.ConnectionDlg.Core.Impl.SqlServerDatabaseDiscoveryProvider.GetDatabaseInstancesFromSqlConnection(UIConnectionInfo uiConnectionInfo, CancellationToken cancellationToken)
at Microsoft.SqlServer.ConnectionDlg.Core.Impl.SqlServerDatabaseDiscoveryProvider.GetDatabaseInstances(UIConnectionInfo uiConnectionInfo, CancellationToken cancellationToken)
Thanks you
The text was updated successfully, but these errors were encountered: