menu
more_vert
打开 IdentityServer4IdentityServer4.SamplesQuickstarts6_AspNetIdentity 无法编译的解决办法

作者:dayu

看到这样的错误提示,毫无意义。赶脚这应该是VS2017的BUG,没有显示错误的位置。于是用dotnet restore手动还原,结果在控制台中终于显示了详细的错误:

C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): error : Package Microsoft.Composition 1.0.27 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Composition 1.0.27 supports: portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) [C:\Users\username\Documents\Admin.Web.Tests\Admin.Web.Tests.csproj]
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): error : One or more packages are incompatible with .NETCoreApp,Version=v1.1. [C:\Users\username\Documents\test\Admin.Web.Tests\Admin.Web.Tests.csproj]

编辑错误项目中的csproj文件:在PropertyGroup节点下增加portable-net45+win8+wp8+wpa81

 <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <PackageTargetFallback>portable-net45+win8+wp8+wpa81</PackageTargetFallback>
  </PropertyGroup>

转载自:https://q.cnblogs.com/q/91766

打开 IdentityServer4\IdentityServer4.Samples\Quickstarts\6_AspNetIdentity 无法编译的解决办法

原文地址:http://www.cnblogs.com/smboy/p/7523792.html