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.
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.
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 causingthe 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.