我们Console App 用 .netFrameWork4.5.1,EF用 6.0.0 原来项目用NUget引用EF6.0.0,在package.config 配置
现在准备用 project.json 来动态配置
现在我配置如下:
project.json文件中
{
"dependencies": {
"EntityFramework": "6.0.0"
},
"frameworks": {
"net451": {}
},
"runtimes": {
"win": {}
}
}
程序编译没问题,运行的时候,老提示
The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application
config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded.
Make sure that the assembly-qualified name is used and that the assembly is available to the running application.
See http://go.microsoft.com/fwlink/?LinkId=260882 for more information."