The specified LocalDb instance does not exist

前端 未结 4 1460
花落未央
花落未央 2020-12-15 07:53

I\'ve been using a localDB named \'Projects\' for a while now. This is the same database that is created by default ASP.NET MVC 5 project. However, suddenly it stopped and I

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-15 08:45

    Interesting that I just experienced the same problem after using (LocalDb)\Projects just fine for months.

    I happen to know the last thing I did on my machine before it stopped working was to install an updated version of Telerik's Kendo MVC UI (which also happens to install a KENDO.MVC.EXAMPLES\APP_DATA\SAMPLE.MDF in LocalDb v11.0) and I'll bet starts and stops the v11.0 local db which screws the Projects instance up somehow and just like you nothing restarts it.

    However if you copy all your .mdf and .ldf files into a temporary folder FIRST, and THEN follow Mrchief's advice to create the "Projects" instance again, and THEN copy your files back over top of the files the create puts in the Projects, it will restore your Projects db back to its original state.

    Just did it one second ago and it worked.

提交回复
热议问题