我正在关注教程link
用于学习.Net Core。我安装好的一切。 但是当我运行迁移时,它会给出错误。
Project.json代码是:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.2",
"Microsoft.EntityFrameworkCore.Tools": "2.0.0-preview1-final",
"Microsoft.AspNetCore.Mvc": "1.0.0"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
请让我知道我错在哪里感谢您的帮助。
答案 0 :(得分:2)
如果您想继续开发ASP.NET Core应用程序,最好升级到Visual Studio 2017和csproj,因为project.json
- 类型的项目不再受支持/更新。所有新版本的dotnet / PowerShell工具都只支持带有csproj的VS2017。
从csproj开始(Version 1.0.0-preview3-final)如果您需要dotnet ef
支持,还需要为Microsoft.EntityFrameworkCore.Tools.DotNet
命令安装dotnet ef
。否则只有powershell命令可用。