GoogleCloudPlatform / aspnet-docker

Apache License 2.0
36 stars 35 forks source link

NuGet package Microsoft.AspNetCore.Authorization causes "The app requires .NET Core runtime version 3.1.x which is not supported at this time". #156

Open gsabboz opened 3 years ago

gsabboz commented 3 years ago

What is expected:

Based on the available docker tags I assumed all packages of AspNetCore were supported up to version 3.1.9. List of images https://console.cloud.google.com/gcr/images/google-appengine/GLOBAL/aspnetcore?gcrImageListsize=30

What is the problem:

After some testing, I found out that NuGet package Microsoft.AspNetCore.Authorization is causing the app requires .NET Core runtime version 3.1.x which is not supported at this time.

How to reproduce:

Use the following project: https://github.com/GoogleCloudPlatform/dotnet-docs-samples/blob/master/appengine/flexible/HelloWorld/HelloWorld.csproj

Replace <TargetFramework>netcoreapp2.1</TargetFramework> with <TargetFramework>netcoreapp3.1</TargetFramework>.

Add the following line <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="3.1.9" /> under <PackageReference Include="Microsoft.AspNetCore.App" />.

Deploy to app engine.

Workaround:

Use NuGet package <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="2.2.0" /> if possible.