Netcore 2.1.1 release leads to app failing to run

后端 未结 7 1528
再見小時候
再見小時候 2020-12-24 03:09

It seems there is suddenly something out of sync with asp.net core packages.

It looks like Microsoft.AspNetCore.App 2.1.1 was released 16 hours ago on nuget.org but

7条回答
  •  遥遥无期
    2020-12-24 03:44

    Your problem is this line of your csproj:

    
    

    The * is saying to pick the latest 2.1 version of that Nuget package. For many packages this would be perfectly fine. However, v2.1.1 of that package requires a matching v2.1.1 SDK to also be installed. As of right now it it not available (it's currently blocked).

    However, if you read the Migrate from ASP.NET Core 2.0 to 2.1 docs, you will see this:

    Replace the version specified "Microsoft.AspNetCore.All" package reference with the versionless "Microsoft.AspNetCore.App" package reference.

    The version is now inferred by the version of the SDK you are targetting. This means your csproj should now contain this:

    
    

提交回复
热议问题