EF架构~Cannot attach the file as database

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了EF架构~Cannot attach the file as database相关的知识,希望对你有一定的参考价值。

回到目录

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.

再次运行应用程序,搞定!

回到目录

以上是关于EF架构~Cannot attach the file as database的主要内容,如果未能解决你的问题,请参考以下文章

Cannot attach the file ‘{0}' as database '{1}'

pycharm the project at uses a non standard layout and cannot be attached to

Cannot attach the file 'E:TeamWorkFidoFido.WebSiteApp_DataFidoData.mdf' as database 

The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class fi

Nginx错误:nginx: [error] OpenEvent("Global gx_reload_6252") failed (2: The system cannot fi

Mysql自动宕机:InnoDB: Cannot allocate memory for the buffer pool