Cannot connect to (localdb) from .NET Core except via Named Pipe on Windows 11 ARM

This issue has been created since 2021-12-22.

Description

I'm trying to connect to SQL Server Express LocalDB from .NET Core 6 on Windows 11 ARM. If I use a connection string that refers to it using the instance name "Data Source=(localdb)\MSSQLLocalDB", it fails with the exception below. If I connect to it using a named pipe, it works.

Microsoft.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SNI_PN11, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.) ---> System.ComponentModel.Win32Exception: %1 is not a valid Win32 application.

I've created some simple MSTest unit tests to repro the problem. There are two test methods in the DatabaseConnectionFixture class that attempt to connect to LocalDB: one uses an ordinary connection string and the other uses a named pipe. On Windows 11 ARM, the ConnectToDatabase_ConnectionString() method fails. If I run this same code on Windows 11 x64, both tests pass.

Configuration

This is running on Windows 11 ARM in a Parallels VM on an M1 MacBook Pro. The OS Build # is 22509.1011. The dotnet core build is 6.0.100.

JRahnama wrote this answer on 2021-12-22

@benday, I have not looked into the repro you have provided or much in details just some quick notes, have you tried with ssms to see if that gets a connection? LocalDb can use two different connection strings.

  1. (localdb)\<Instance name> or (localdb)\.\<shared instance name> or (localdb)\.. Last one connects to default local db which is MSSQLLocalDB

  2. np:\.\pipe\LOCALDB#\tsql\query

The first one should be working without any issues, but there is an open issue for second one #1395 and PR #1433 is made to address issue.

One other problem with Instance pipe name is if its state is stopped you wont be able to get a connection from Instance pipe name. make sure you have ran SqlLocalDB start <instance name>
image

benday wrote this answer on 2021-12-23

@JRahnama -- Thanks for that input. I hit that named pipe issue you mentioned but did a workaround a while back by simply setting Encrypt=false in the connection string. Not ideal but good enough to allow me to connect via "np:". Put another way, no issues for me on the ARM/Named Pipe thing.

I tried the default instance syntax "(localdb)." that you suggested and I'm still getting the same error. The repro repo that I posted actually ensures that the localdb instance is running before attempting to connect to it.

Per your question about SSMS, SSMS doesn't install on Win11 ARM. But I can connect to localdb using SQL Server Object Explorer in VS2022 running on ARM. What's extra strange is that I can connect to localdb using an app I wrote for dotnet 5 that's published to the store. https://www.microsoft.com/store/productId/9P5DZ9KQC7GR

I think there is something about native .NET6 apps trying to connect that doesn't work from ARM. But that same code works fine when it's run in x86/x64 emulation under ARM.

JRahnama wrote this answer on 2022-01-05

@benday is the app on net 5 using same username/password to get connection? If not, I would say you probably need to add user login to your localdb
CREATE LOGIN [username goes here] FROM WINDOWS WITH DEFAULT_DATABASE=[master] and add related roles, but if net5 is working with same credentials that is a different story. Setting up the environment will take sometime.

  1. I created a VM for Windows 11
  2. Added VS2022 and SqlServer 2019
  3. Add a sample repro with ARM64 configuration for net6 TFW

and everything worked as expected. maybe I need to have Windows 11 ARM. Did you try it from Windows 11 Insider Preview Build?

benday wrote this answer on 2022-01-05

@JRahnama --

Yes, you'll definitely need a win11 arm machine to test this. As stated in the original bug report, everything works as expected on win11 on Intel x64. It fails on arm.

Regarding the .net5 app running on win11 arm, I was connecting using "trusted connection=true" and that oddly worked fine.

JRahnama wrote this answer on 2022-01-10

@benday can you try adding AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.UseManagedNetworkingOnWindows", true); in your application to enforce Managed SNI usage to see the behavior?

JRahnama wrote this answer on 2022-01-11

One more question here can you run dumpbin.exe /headers SqlUserInstance.dll in the path of C:\Program Files\Microsoft SQL Server\150\LocalDB\Binn also check Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions\15.0 in the registry to see if the path is correctly installed?

eolamisan wrote this answer on 2022-01-13

I am having similar issue with .net 6.0 on regular intel dev laptop connecting to (localdb)\instancename in IIS.

Does not work

(localdb)\instancename

Works

np:\.\pipe\LOCALDB#FA0859AB\tsql\query

Exception

System.Data.Entity.Core.EntityException: The underlying provider failed on Open.
---> System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location ---
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.ExecuteAsyncImplementation[TResult](Func1 func) at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter.GetResult() at System.Data.Entity.Core.EntityClient.EntityConnection.OpenAsync(CancellationToken cancellationToken) ClientConnectionId:00000000-0000-0000-0000-000000000000 Error Number:-1,State:0,Class:20 --- End of inner exception stack trace --- at System.Data.Entity.Core.EntityClient.EntityConnection.OpenAsync(CancellationToken cancellationToken) at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter.GetResult() at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnectionAsync(Boolean shouldMonitorTransactions, CancellationToken cancellationToken) at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter.GetResult() at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransactionAsync[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess, CancellationToken cancellationToken)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.ExecuteAsyncImplementation[TResult](Func1 func) at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter1.GetResult()
at System.Data.Entity.Core.Objects.ObjectQuery1.GetResultsAsync(Nullable1 forMergeOption, IDbExecutionStrategy executionStrategy, CancellationToken cancellationToken)
at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter1.GetResult() at System.Data.Entity.Internal.LazyAsyncEnumerator1.FirstMoveNextAsync(CancellationToken cancellationToken)
at System.Data.Entity.Infrastructure.IDbAsyncEnumerableExtensions.ForEachAsync[T](IDbAsyncEnumerator1 enumerator, Action1 action, CancellationToken cancellationToken)

Configuration

Processor Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz
Installed RAM 32.0 GB (31.6 GB usable)
System type 64-bit operating system, x64-based processor

Edition Windows 10 Enterprise
Version 20H2
Installed on ‎12/‎20/‎2020
OS build 19042.1415
Experience Windows Feature Experience Pack 120.2212.3920.0

Should I create a separate ticket?

eolamisan wrote this answer on 2022-01-13

I am having similar issue with .net 6.0 on regular intel dev laptop connecting to (localdb)\instancename.

Does not work

(localdb)\instancename

Works

np:.\pipe\LOCALDB#FA0859AB\tsql\query

Exception

System.Data.Entity.Core.EntityException: The underlying provider failed on Open.
---> System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location ---
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.ExecuteAsyncImplementation[TResult](Func1 func) at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter.GetResult() at System.Data.Entity.Core.EntityClient.EntityConnection.OpenAsync(CancellationToken cancellationToken) ClientConnectionId:00000000-0000-0000-0000-000000000000 Error Number:-1,State:0,Class:20 --- End of inner exception stack trace --- at System.Data.Entity.Core.EntityClient.EntityConnection.OpenAsync(CancellationToken cancellationToken) at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter.GetResult() at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnectionAsync(Boolean shouldMonitorTransactions, CancellationToken cancellationToken) at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter.GetResult() at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransactionAsync[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess, CancellationToken cancellationToken)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.ExecuteAsyncImplementation[TResult](Func1 func) at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter1.GetResult()
at System.Data.Entity.Core.Objects.ObjectQuery1.GetResultsAsync(Nullable1 forMergeOption, IDbExecutionStrategy executionStrategy, CancellationToken cancellationToken)
at System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter1.GetResult() at System.Data.Entity.Internal.LazyAsyncEnumerator1.FirstMoveNextAsync(CancellationToken cancellationToken)
at System.Data.Entity.Infrastructure.IDbAsyncEnumerableExtensions.ForEachAsync[T](IDbAsyncEnumerator1 enumerator, Action1 action, CancellationToken cancellationToken)

Configuration

Processor Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz Installed RAM 32.0 GB (31.6 GB usable) System type 64-bit operating system, x64-based processor

Edition Windows 10 Enterprise Version 20H2 Installed on ‎12/‎20/‎2020 OS build 19042.1415 Experience Windows Feature Experience Pack 120.2212.3920.0

Should I create a separate ticket?

For some reason setting this flag:

setProfileEnvironment="true"

in this is file:

C:\Windows\System32\inetsrv\config\applicationHost.config

fixed it for me.

Is this the recommended approach?

Source:
https://stackoverflow.com/questions/15491388/iis-applicationhost-setenvironment-attribute

benday wrote this answer on 2022-01-14

One more question here can you run dumpbin.exe /headers SqlUserInstance.dll in the path of C:\Program Files\Microsoft SQL Server\150\LocalDB\Binn also check Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions\15.0 in the registry to see if the path is correctly installed?

Here's the output from dumpbin:
dumpbin-output.txt

benday wrote this answer on 2022-01-14

I added a new test to the sample repo that adds that UseManagedNetworkingOnWindows call. The test still fails but it gives a different error message. The new error message is:

System.Exception: Cannot connect to SQL Server Browser. Ensure SQL Server Browser has been started. ---> System.Net.Sockets.SocketException: No such host is known.
Stack Trace:
at System.Net.Dns.GetHostEntryOrAddressesCore(String hostName, Boolean justAddresses, AddressFamily addressFamily, ValueStopwatch stopwatch)
at System.Net.Dns.GetHostAddresses(String hostNameOrAddress, AddressFamily family)
at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
at System.Net.Sockets.UdpClient.GetEndpoint(String hostname, Int32 port)
at System.Net.Sockets.UdpClient.SendAsync(Byte[] datagram, Int32 bytes, String hostname, Int32 port)
at Microsoft.Data.SqlClient.SNI.SSRP.SendUDPRequest(String browserHostname, Int32 port, Byte[] requestPacket)
at Microsoft.Data.SqlClient.SNI.SSRP.GetPortByInstanceName(String browserHostName, String instanceName)
--- End of inner exception stack trace ---
at Microsoft.Data.SqlClient.SNI.SSRP.GetPortByInstanceName(String browserHostName, String instanceName)
at Microsoft.Data.SqlClient.SNI.SNIProxy.CreateTcpHandle(DataSource details, Int64 timerExpire, Boolean parallel, SqlConnectionIPAddressPreference ipPreference, String cachedFQDN, SQLDNSInfo& pendingDNSInfo)
at Microsoft.Data.SqlClient.SNI.SNIProxy.CreateConnectionHandle(String fullServerName, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Byte[]& instanceName, Byte[][]& spnBuffer, Boolean flushCache, Boolean async, Boolean parallel, Boolean isIntegratedSecurity, SqlConnectionIPAddressPreference ipPreference, String cachedFQDN, SQLDNSInfo& pendingDNSInfo)
at Microsoft.Data.SqlClient.SNI.TdsParserStateObjectManaged.CreatePhysicalSNIHandle(String serverName, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Byte[]& instanceName, Byte[][]& spnBuffer, Boolean flushCache, Boolean async, Boolean parallel, SqlConnectionIPAddressPreference iPAddressPreference, String cachedFQDN, SQLDNSInfo& pendingDNSInfo, Boolean isIntegratedSecurity)
at Microsoft.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover, SqlAuthenticationMethod authType)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool)
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open()
at Benday.ArmDemo1.UnitTests.DatabaseConnectionFixture.Connect(String connstr) in c:\code\benday-inc\Benday.ArmDemo1\test\Benday.ArmDemo1.UnitTests\DatabaseConnectionFixture.cs:line 84
at Benday.ArmDemo1.UnitTests.DatabaseConnectionFixture.ConnectToDatabase_ConnectionString_LocalDb_NamedInstance_UseManagedNetworkingOnWindows() in c:\code\benday-inc\Benday.ArmDemo1\test\Benday.ArmDemo1.UnitTests\DatabaseConnectionFixture.cs:line 41

Xenyr wrote this answer on 2022-01-18

Just wanted to report that this issue also concerns a native Windows 11 ARM installation on a Surface Pro X. Yet having troubles to install SQL Server 2019 at all (SQL Server Express, SQL Server Express Advanced and SSMS won't install without errors), the SQL Server 2019 LocalDB installation somehow manages to get through successfully. However, trying to access the local database via connection string (localdb)\MSSQLLocalDB as part of developing a Blazor WASM application gave me exactly the same error as in the original post (provider: SNI_PN11, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry).

Developing using VS Code, I installed the SQL server extension for VS Code (https://docs.microsoft.com/en-us/sql/tools/visual-studio-code/sql-server-develop-use-vscode). Interestingly enough, trying to access the LocalDB via connection string using this extension succeeds on ARM, even starting the database instance if previously stopped. I verified this behaviour calling sqllocaldb info mssqllocaldb before and after accessing the database using the SQL server extension, which gave me an Instance: Stopped with no instance pipe name formerly and an Instance: Running alongside an instance pipe name afterwards.

The Microsoft Surface Pro X has been configurated with a Microsoft SQ2 Processor and 16 GB RAM, running Windows 11 Build 22000.434 on arm64.

ErikEJ wrote this answer on 2022-01-18

@Xenyr I think it should be: (localdb)\MSSQLLocalDB

Xenyr wrote this answer on 2022-01-18

@Xenyr I think it should be: (localdb)\MSSQLLocalDB

Absolutely, sorry for that typo. I had tested it with the backslash back then and therefore edited my comment.

shwelc2 wrote this answer on 2022-06-27

I am experiencing the same issue with Windows 11 Arm/EF 6.06 /Visual Studio 2022 and localDB. I can connect to localdb in SSMS and also visual studio server explorer, but running migrations (update-database) always gives an error about being unable to connect to localdb. I also tried a clean install of the new Visual Studio 2022 Preview (arm) thinking this would resolve it, but the issue is still there.

"DefaultConnection": "Server=(localdb)\mssqllocaldb;Database=aspnet-demo6-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true"

Error Number:193,State:0,Class:20
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SNI_PN11, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.)

shwelc2 wrote this answer on 2022-06-27

I am experiencing the same issue with Windows 11 Arm/EF 6.06 /Visual Studio 2022 and localDB. I can connect to localdb in SSMS and also visual studio server explorer, but running migrations (update-database) always gives an error about being unable to connect to localdb. I also tried a clean install of the new Visual Studio 2022 Preview (arm) thinking this would resolve it, but the issue is still there.

"DefaultConnection": "Server=(localdb)\mssqllocaldb;Database=aspnet-demo6-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true"

Error Number:193,State:0,Class:20 A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SNI_PN11, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.)

Should have added also
Edition Windows 11 Enterprise
Version 22H2
Installed on ‎6/‎10/‎2022
OS build 22621.160
Experience Windows Feature Experience Pack 1000.22632.1000.0

benday wrote this answer on 2022-08-06

FYI, I tried re-running my repro repo code (https://github.com/benday-inc/Benday.ArmDemo1) using Visual Studio Enterprise 2022 (ARM 64-bit) Version 17.3.0 Preview 6.0. I'm still getting the same errors.

It would be really nice to be able to work with some kind of SQL Server on ARM64. @JRahnama, are there any updates you could share on this?

Thanks,
-Ben

JRahnama wrote this answer on 2022-08-07

@benday MSSQLLocalDb is not supported on Win11 ARM64 so far. The SQLUserInstance.dll l is built for x64 and is not compatible for ARM64 and I am not sure who owns that library.

More Details About Repo
Owner Name dotnet
Repo Name SqlClient
Full Name dotnet/SqlClient
Language C#
Created Date 2019-02-28
Updated Date 2022-10-05
Star Count 642
Watcher Count 63
Fork Count 186
Issue Count 218

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Spawn rejects on stderr 4 2021-08-21 2022-05-01
Calculation of R_K(*) 2 2021-07-07 2022-08-28
q^2 dependence in Wilson coefficients 6 2021-10-02 2022-06-29
Constraint not understood 1 2021-09-13 2022-08-30
error: too few arguments to function 'json_objOpen' 0 2021-11-17 2022-03-22
Captcha detected but not solved 3 2022-03-02 2022-09-29
Form验证码Bug,提交错误的验证码时出现异常信息页面 1 2022-04-03 2022-09-24
如何在自定义内容中的显示模板里面调用表单对应字段的模板 4 2022-03-28 2022-09-24
[Feature request] Add Transparent theme 0 2022-01-25 2022-09-03
Failing to boot in DOSBox-X with 286 or newer 17 2022-05-03 2022-08-01
Update MultipleTargets.csproj from .NET Core 3.0, .NET Framework net472 to LTS (or current) version 0 2021-02-23 2022-09-24
Local fulfilment not working for multiple hubs 0 2022-05-19 2022-09-27
outer_boundary_corners and __contains__ raise ValueError on some areas 1 2021-11-09 2022-09-19
Support for 88F6702 architecture 2 2021-09-20 2022-09-27
Fix encoding while running a generation chain model 1 2021-07-30 2022-08-06
Auto-delete temporary zip files after downloading Electron? 4 2022-01-06 2022-09-23
@-links in profile bio pointing to other instances are incorrectly linkified 0 2022-01-20 2022-03-26
LinkedIn - Get sentiment analysis for all comments on a post 1 2022-06-17 2022-10-06
PyCaret - Perform Regression with AutoML 0 2022-06-11 2022-09-02
Download Sample Data button not working(gives 404 error) 1 2021-06-23 2022-09-19
Import ABC from collections.abc for Python 3.10 compatibility. 2 2021-07-31 2022-02-06
as of hapi-fhir v5.7.0, hapi-fhir-cli no longer supports MySQL 5.7 3 2022-03-03 2022-08-30
Having issues with icons/custom modules 0 2022-09-13 2022-10-04
Backlight module icon missing 5 2022-09-16 2022-10-04
maximizability issues - charts don't show up with width/height set to `'auto'` 39 2021-09-21 2022-09-22
[🐛] Android Target targetSdkVersion 31 targetSdkVersion 31 Build Error 34 2022-08-23 2022-09-18
Different font sizes in the menu 4 2021-11-01 2022-10-02
Remove unused errors from errno enum 0 2021-03-16 2022-09-22
After restart node get stuck downloading blocks 2 2022-02-01 2022-10-05
EIP-1559 V2: Advanced gas fee modal - getting 12 hour ranges of base fee and priority fee 1 2021-10-25 2022-09-16
MacBook Pro 13" 2020 - 133.924s 0 2021-10-28 2022-07-09
doc: Improve documentation about how to configure Twilio for Chatwoot 3 2022-04-25 2022-09-30
Crash on omitting `.json` in `extends` field inside `tsconfig.json` 8 2020-11-22 2022-10-02
Discuss forking vs. branching for getting code into the project 0 2021-09-17 2022-09-04
Using non-numeric feature ID 4 2017-01-25 2022-10-06
Output & Input Audio Disappears When I Accept a Call 0 2021-11-26 2022-09-26
82 symbols length constraint error for a pipeline name while creating a new pipeline 3 2022-02-14 2022-09-18
[IMP] Migrate to poetry to manage package 13 2021-04-13 2022-02-06
the voice note being played is not stopped when a new voice note is sent 0 2021-10-06 2022-09-22
More chats in desktop mode. 10x5 e.g. 0 2021-10-03 2022-09-22
Muted mod makes the game become laggy after 2-3mins of playing 0 2022-04-13 2022-08-07
[Android] Emulator is killed when stop debugging 0 2019-07-19 2022-10-05
improve RESTler tutorial documentation 0 2022-04-29 2022-09-07
Execution failed for task ':ReactAndroid:generateCodegenArtifactsFromSchema'. 2 2022-04-22 2022-09-29
Error: internal communication error 5 2021-06-14 2022-07-06
Tag v5 does not point to latest commit 5 2022-07-25 2022-09-27
latest new version invalid-function lsp-ui--with-no-redisplay 1 2022-01-04 2022-09-22
[Feature] Know current zoom rate in viewport 0 2022-04-20 2022-09-16
Recursive field attachements?! 1 2021-04-21 2022-09-24
Direct2D/DirectWrite/WIC support? 0 2022-02-17 2022-10-06