【发布时间】:2016-11-01 19:59:35
【问题描述】:
今天我在 Win 7 上安装了最新版本的 ASP.NET Core 1.0 和 VS2015 Update 3(6 月 27 日发布)。然后按照 MS 文章并在this step of the article 上收到以下错误:
Unable to find expected assembly attribute named DesignTimeProviderServicesAttribute in provider assembly Microsoft.EntityFrameworkCore. This attribute is required to identify the class which acts as the design-time service provider factory.
我的命令如下:
Scaffold-DbContext "Server=MyComputerName\SQL2012;Database=northwind;Trusted_Connection=True;" -OutputDir ".\Models" Microsoft.EntityFrameworkCore
project.json 文件一节
"tools": {
"BundlerMinifier.Core": "2.0.238",
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
"Microsoft.Extensions.SecretManager.Tools": "1.0.0-preview2-final",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.0.0-preview2-final",
"imports": [
"portable-net45+win8"
]
}
},
在带有 SQL Express 2014 的 win 8.1 上,使用上述版本的 ASP.NET Core 和 VS2015 Update 3,我可以成功地按照上述文章中的所有步骤进行操作,而不会出现任何错误。
【问题讨论】:
标签: visual-studio-2015 ef-code-first asp.net-core entity-framework-core