且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MVC"新增控制器"是"无法检索元数据... ...配置系统初始化失败"

更新时间:2022-01-19 08:40:29

我已经安装了它增加EF 6:

I had installed EF 6 which added:

<providers>
    <provider invariantName="System.Data.SqlClient" 
        type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>

在我的配置文件。我有其他的脚手架问题,于是决定回退到EF 5 EF卸载6和重新安装EF 5我删除了从配置,然后我是能够建立我的新控制器之后。我利用这个发现的

In my config file. I had other scaffolding issues and so decided to fall back to Ef 5. After uninstalling EF 6 and reinstalling EF 5 I deleted the from the config and then I was able to build my new controller. I discovered this by using the

PM> Update-Database –Verbose