Netcore 2.1.1 release leads to app failing to run

In addition to other suggestions, I needed to up the Microsoft.NetCore.App to 2.1.1. Since I couldn't do it via the UI, adding the following to the .csproj worked.

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

Your problem is this line of your csproj:

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

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 is 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 targeting. This means your csproj should now contain this:

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

The 2.1.1 (preview) SDK is available on their GitHub.

You can download directly here:

https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/20180605-09/final/assets/Sdk/2.1.301-preview-008906/dotnet-sdk-2.1.301-win-x64.exe

See:

https://github.com/dotnet/versions/tree/7a833dddfddc27f2074b755b94234a25b9757637/build-info/dotnet/product/cli/release/2.1

We are still waiting on the official SDK...

Edit:

If you are having trouble building, add the following to your .csproj

<PropertyGroup>     
  <TargetLatestAspNetCoreRuntimePatch>true</TargetLatestAspNetCoreRuntimePatch>
</PropertyGroup>

Update:

Official 2.1.1 SDK now released: https://www.microsoft.com/net/download/thank-you/dotnet-sdk-2.1.301-windows-x64-installer

Tags:

Asp.Net Core