feedback icon indicating copy to clipboard operation
feedback copied to clipboard

[cloud-istio-aspnetcore-part1]: SDK is outdated

Open rafind opened this issue 1 year ago • 0 comments

Image wont build with sdk 5. I changed to 8 in the dockerfile and works just fine.

Here a sample of the error:

=> [build 3/7] COPY *.csproj ./ 0.0s => ERROR [build 4/7] RUN dotnet restore 1.7s

[build 4/7] RUN dotnet restore: 1.602 Determining projects to restore... 1.625 /usr/share/dotnet/sdk/5.0.408/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/app/HelloWorldAspNetCore.csproj]


Dockerfile:9

7 | # Copy csproj and restore as distinct layers. 8 | COPY *.csproj ./ 9 | >>> RUN dotnet restore 10 |
11 | # Copy local code to the container image.

rafind avatar Mar 21 '24 17:03 rafind