Microsoft.AspNetCore.App 2.1.1 upgrade "Blocked by project"

Solution 1:

Easy. Was looking for a resolution for this earlier and I all I had to do was just add this in the projects affected.

  <PropertyGroup>
    <RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion>
  </PropertyGroup>

Additionally for .NET Core 3 and beyond,

   <PropertyGroup>
     <TargetFramework>netcoreapp3.1</TargetFramework>
   </PropertyGroup>

There was also an answer posted by Patrick below pointing out that certain projects require the .NET Core App NuGet Package. You won't need that anymore after .NET Core 3.

Solution 2:

In my case it was caused by missing Version attribute on Microsoft.AspNetCore.App.

For some reason when the WebApi project was created the package was referenced like this:

<PackageReference Include="Microsoft.AspNetCore.App" />

Adding the missing attribute resolved all issues with updates and builds on the build server.

<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.1" />