Problem encountered on https://dotnet.microsoft.com/learn/aspnet/microservice-tutorial/docker-image
Operating System: windows
error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.1. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.1. [C:\src\myMicroservice.csproj]
The command 'cmd /S /C dotnet restore' returned a non-zero code: 1
@dagood @leecow Are our docker images updated to 3.1?
It looks like the issue is on the tutorial side, this page: https://dotnet.microsoft.com/learn/aspnet/microservice-tutorial/docker-file
Uses 2.2 images:
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
...
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
I believe this ends up being incompatible with the 3.1 project generated by running dotnet new with the 3.1 SDK you get from the install step: https://dotnet.microsoft.com/learn/aspnet/microservice-tutorial/install
/cc @MichaelSimons
This has been reported many times before: https://github.com/dotnet/core/issues?utf8=✓&q=is%3Aissue+is%3Aopen+tutorial+2.2
https://github.com/dotnet/core/issues/4152
https://github.com/dotnet/core/issues/4071
https://github.com/dotnet/core/issues/4004
https://github.com/dotnet/core/issues/3983
https://github.com/dotnet/core/issues/3931
(Also https://github.com/dotnet/core/issues/3980, on the closed side.)
Solved . Thanks for Support .@dagood and @scalablecory
Thanks for the report! Fixing the tutorial itself is tracked at https://github.com/dotnet/website/issues/1649 (private repo, sorry), hopefully we'll have it updated soon.