回到目錄 Cannot attach the file as database這個異常是在EF的code frist里經常出現的,解決方法很簡單,只要重新啟動一下V11實例即可。 CMD> sqllocaldb.exe stop v11.0 LocalDB instance "v11.0" stop
Cannot attach the file as database這個異常是在EF的code frist里經常出現的,解決方法很簡單,只要重新啟動一下V11實例即可。
CMD> sqllocaldb.exe stop v11.0 LocalDB instance "v11.0" stopped. CMD> CMD> sqllocaldb.exe delete v11.0 LocalDB instance "v11.0" deleted. CMD> sqllocaldb.exe start v11.0 LocalDB instance "v11.0" started.
再次運行應用程式,搞定!