0

Tried 'update-database' on project I'm add SQL to. 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: SNI_PN11, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.

Connection string:

"ConnectionStrings": {
    "PuzzleContext": "Server=(localhost)\\SQLEXPRESS;Database=puzzle;Trusted_Connection=True;"
}

Any help is very appreciated!

SQL Server is running as a service. Server Explorer can see, connect, and access the server and other databases on the server (I'm using update-database to create the new database so it doesn't exist yet). Ditto for SSOX and SSMS.

Tried altering to a different database name (master) which already exists, but I think it's not even getting connected to the server (let alone the database).

I've uninstalled and reinstalled all sorts of stuff to try to get Visual Studio to see the SQL Server, but nothing seems to be working. I'm not real knowledgeable about SQL...

What I'm looking for update-database to do is create an empty version of the database on the server for my app to populate with initial rows of stuff.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
ToddG
  • 1

0 Answers0