title: EF Core Cannot Connect to Server - A network-related or instance-specific error
body: <p><strong>Important</strong> : Before people point to the common causes, the connection string works in one project on my local machine, but not the other project on the same local machine connecting to the same local instance to the SAME database.</p>
  
  <p>I am having a weird issue. I have 2 EF core projects. My connection string in the first project works perfectly. I can type "dotnet ef database update", and it will push my migration to the LOCAL database. I copy pasted the below string EXACTLY to my 2nd project, and it throws the error:</p>
  
  <blockquote>
    <p>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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)</p>
  </blockquote>
  
  <p>Here is my connection string:</p>
  
  <pre><code>Server=.;Database=RAMSAPPDB;Integrated Security=False;Persist Security Info=True;MultipleActiveResultSets=True;
  </code></pre>
  
  <p>I cannot think of a single reason why using this connection string in my other project, which tries to add to the SAME database, would throw this error. I tried removing all the tables in the RAMSAPPDB before pushing the migrations in the 2nd project, but it just doesn't work.</p>
  
  <p>If I comment out the "ConnectionString", I get the error </p>
  
  <blockquote>
    <p>connectionString cannot be blank</p>
  </blockquote>
  
  <p>so I know it is using the connection string in my <code>appsettings.json</code>.</p>
  
  <p>Any ideas on possible causes would be greatly appreciated. Thank you.</p>