我刚刚更新了我的nuget包到EF 7.0.0-rc1-final从以前的EF 7版本它打破了我的SQL连接字符串代码。我已经安装EntityFramework.Core中的NuGet最新版本,但我似乎无法与“用”引用它更新到EF 7.0.0-rc1-final打破了SQL DbContextOptionsBuilder UseSqlServer
The Type 'DbContextOptionsBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'EntityFramework.Core, Version 7.0.0.0'
:
using System.Collections.Generic;
using ComicEndpoints.Models;
using System.Threading.Tasks;
using Microsoft.Data.Entity;
protected override void OnConfiguring(DbContextOptionsBuilder options)
{
options.UseSqlServer(@"ConnectionString");
}
的错误。这只是在更新到rc1-final时发生的,我找不到任何引用该更改的文档。
project.JSON
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
"Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"EntityFramework.SqlServer": "7.0.0-beta8",
"EntityFramework.SqlServer.Design": "7.0.0-beta8",
"EntityFramework.Commands": "7.0.0-rc1-final",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
"Newtonsoft.Json": "8.0.1-beta2",
"EntityFramework.Core": "7.0.0-rc1-final"
},
"commands": {
"web": "Microsoft.AspNet.Hosting --config hosting.ini",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"dnx451": {
"dependencies": {
"Microsoft.AspNet.WebApi.Cors": "5.2.3",
"Microsoft.Owin.Cors": "3.0.1"
}
},
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
]
}
你应该张贴您的project.json文件作为你的问题的一部分 –
你有没有更新的一切,有些东西你还是有beta8 –
“Microsoft.Framework.Configuration。 Json“需要重命名为Microsoft.Extensions.Configuration.Json才能获得rc1-final –