Visual Studio 2022 localdb ((localdb)\MSSQLLocalDB) (running on ASP.NET Core).
My problem is: I want to change from VS2019 to VS2022.
- VS2019 and SSMS works totally fine. localdb works
- VS2022 have from the first installation no connection to localDB
I can create a new DB and connect it but that is not what I want. I want the connection to the localDB.
What I already tried:
- Reinstall VS2022
- Reinstall localDB
- Disconnect VS2019 and VS 2022 and reconnect. VS2019 works and VS2022 does not
- I also followed the Microsoft docs; nothing helped
- Followed many Stack Overflow discussions
If I try to connect to (localdb)\MSSQLLocalDB
, I get this error
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) (.Net SqlClient Data Provider)
If I try to start the ASP.NET Core app, I get this error:
IOException: IDX20807: Unable to retrieve document from: 'System.String'. HttpResponseMessage: 'System.Net.Http.HttpResponseMessage', HttpResponseMessage.Content: 'System.String'. Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(string address, CancellationToken cancel)
InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.
Microsoft.IdentityModel.Protocols.ConfigurationManager.GetConfigurat ionAsync(CancellationToken cancel)
I know this problem is really wired, but maybe one of you has an idea that helps.
I'm thankful for any help. :)