title: How to move a SQL Server LocalDB database to a new computer
body: <p>I purchased a new computer. On my old computer I had created an ASP.NET Core 1.0 web application project that uses Entity Framework Core. I now need instructions for how to move the project &amp; database to my new computer for further development. I have copied all of the Visual Studio solution's files to a folder on the new computer. When I try to run it I get a database login failure exception.  </p>
  
  <p>I located the database on the old computer in the <code>C:\Users\steven\</code> folder as <code>aspnet-Intake-c7c5&lt;more numbers&gt;.mdf</code> (and another one with .ldf). Also on the old computer the database also shows up in Visual Studio's SQL Server Object Explorer under <code>(localdb)\MSQLLocalDB\databases\</code>. I copied the <code>.mdf</code> and <code>.ldf</code> files to the <code>C:\Users\steve\</code> folder on the new computer (note the username change from steven to steve) but it does not show up in the SQL Server Object Explorer on the new computer.  </p>
  
  <p>Can anyone tell me how to get the copied database into the SQL Server Object Explorer on the new computer so my application can hopefully locate it? I am using Windows 10. Old computer has Visual Studio 2015 and new computer has Visual Studio 2017.</p>
  
  <p>Thank you all for your answers.  As it turns out, I had used Entity Framework so I was able to use EF Database Migrations to recreate the DB.  If it will help anyone else, if you used ef database migrations and want to re-create the DB you just go into the Nuget Package Manager Console and use the command update-database.  It recreates the database (but, of course, not the data).  I was not concerned about the data since it's just data used for development and testing.  I will try to phrase my questions better in the future. Thanks again.  It's working now.</p>