Home » , » [MVC 5] Lỗi "Cannot attach the file ‘{0}' as database '{1}'" khi chạy lệnh Update-Database

[MVC 5] Lỗi "Cannot attach the file ‘{0}' as database '{1}'" khi chạy lệnh Update-Database

Đăng bởi Unknown vào lúc Thứ Sáu, 14 tháng 3, 2014 | 09:18

Nếu bạn xóa các tập tin DB, nó vẫn vẫn đăng ký với SqlLocalDB. Đôi khi nó sửa chữa nó để xóa DB. Bạn có thể làm điều này từ dòng lệnh.

     1/ Mở "Developer Command Propmpt for VisualStudio" trong start/programs menu của bạn.
( Đường dẫn trong VS 2013 : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts\Developer Command Prompt for VS2013 )
     2/ Chạy các lệnh sau:


         sqllocaldb.exe stop v11.0
         sqllocaldb.exe delete v11.0
Chia sẻ bài này :

0 nhận xét:

Đăng nhận xét



 
Support : Your Link | Your Link | Your Link
Copyright © 2013. Thiết Kế Website - All Rights Reserved
Template Created by Creating Website Modified by CaraGampang.Com
Proudly powered by Blogger