如何更新 Microsoft.AspNetCore?
问题描述:
我正在运行 2.1.0-rc1-final 但我注意到 2.1.1 现已发布.我想知道如何更新我的代码?
I am running 2.1.0-rc1-final but I noticed that 2.1.1 is now out. I am wondering how to update my code?
当我尝试在 nuget ui 管理器中更新它时,它说被项目阻止"
When I try to update it in the nuget ui manager it says "blocked by project"
答
请确保您安装了最新版本的 .NET Core SDK(当前为 2.1.301)并且没有为您使用的元包设置显式版本:
Make sour you have a recent version of the .NET Core SDK installed (currently 2.1.301) and no explicit version set for the metapackage you are using:
<Project Sdk="Microsoft.NET.Sdk.Web">
…
<ItemGroup>
<!-- No Version needed -->
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>