Auth0 Home Blog Docs

ASP.NET 2.1 Sample Project actually targets .NET Core 3.1

I am new to auth0, and have been experimenting with ASP.NET 2.1 servers. Specifically I have been trying to use the sample project However, it won’t build in Visual Studio 2017 or as a docker image:

ubuntu@ip-xxx-xx-xx-xx:~/Developer/quickstart/01-login$ sudo docker build -t auth0-aspnetcore-mvc-01-login .
Sending build context to Docker daemon 2.478MB
Step 1/8 : FROM microsoft/dotnet:2.1-sdk
—> 7702edb73879
Step 2/8 : WORKDIR /source
—> Using cache
—> 2e6bbaa39b86
Step 3/8 : COPY *.csproj .
—> Using cache
—> 37977aa0a9c6
Step 4/8 : RUN [“dotnet”, “restore”]
—> Running in ec4f91bfa36a
/usr/share/dotnet/sdk/2.1.803/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.1. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 3.1. [/source/SampleMvcApp.csproj]
The command ‘dotnet restore’ returned a non-zero code: 1

I think there must be a bug in how the project is set up because it seems to be referencing .NET Core 3.1 instead of 2.1, as in the SampleMvcApp.csproj it has netcoreapp3.1 as the TargetFramework: netcoreapp3.1.

This was discussed as part of a technical support ticket, but for the benefit of other there was indeed an issue with this quickstart incorrectly pointing to a 3.1 version; this should now be resolved and the quickstart is currently pointing to a specific branch still containing the 2.1 sample code.