0

My Error in Logs Explorer when I deploy my App in Google Cloud>Workloads

It was not possible to find any compatible framework version

The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.

The following frameworks were found: 5.0.4 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:

https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=debian.10-x64

My Dockerfile:

FROM mcr.microsoft.com/dotnet/sdk

COPY . /app

WORKDIR /app

RUN dotnet publish -c Release -o out

COPY /out .

ENTRYPOINT ["dotnet", "Test.dll"]
sysadmin1138
  • 131,083
  • 18
  • 173
  • 296

1 Answers1

0

The solution is to alter the Dockerfile like so:

FROM mcr.microsoft.com/dotnet/sdk:3.1
WORKDIR /app

COPY . .

ENTRYPOINT ["dotnet", "run"]

It is important that in your directory there is a .csproj and your Program (.cs).