开发环境:vs2017
目标框架:
<TargetFramework>netcoreapp1.1</TargetFramework>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
命令: dotnet ef migrations add VotePeriodV2
错误:
Startup project '*.*.*.csproj' targets framework '.NETCoreApp' version '1.1'. This version of the Entity Framework Core .NET Command-line Tools only supports version 2.0 or higher. For information on using older versions of the tools, see https://go.microsoft.com/fwlink/?linkid=871254
添加 global.json 文件,在其中指定 .net core sdk 的版本
完美解决 谢谢
{
"sdk": {"version": "1.1.2"}
}