私は、以前のEF 7バージョンからEF 7.0.0-rc1-finalへのナゲットパッケージを更新しました。これは、SQL接続文字列コードを壊しました。
using System.Collections.Generic;
using ComicEndpoints.Models;
using System.Threading.Tasks;
using Microsoft.Data.Entity;
protected override void OnConfiguring(DbContextOptionsBuilder options)
{
options.UseSqlServer(@"ConnectionString");
}
エラー:
タイプ 'DbContextOptionsBuilder'は、参照されていないアセンブリで定義されています。アセンブリ 'EntityFramework.Core、Version 7.0.0.0'への参照を追加する必要があります
EntityFramework.CoreをNuGetの最新バージョンにインストールしましたが、 'using'で参照することはできません。これはちょうどrc1-finalに更新したときに発生したもので、変更を参照している文書が見つかりません。
プロジェクト.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"
]
}
私はこの名前も変わったと信じています:
'EntityFramework.SqlServer': "7.0.0-rc1-final '
- それは今です:
'EntityFramework.MicrosoftSqlServer': "7.0.0-rc1-final '
post: ASP.NET 5 Beta 8からRC1へのアップグレード
ヒント:GitHubからAsp.Net Docsをダウンロードして、それら(ASP.NET著者)が参照と依存関係をどのようにコーディングしているかを確認してください...