Core: The current .NET SDK does not support targeting .NET Core 3.1

Created on 20 Jan 2020  Â·  5Comments  Â·  Source: dotnet/core

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

area-tutorials

All 5 comments

@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

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.

Was this page helpful?
0 / 5 - 0 ratings