The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a .NET SDK that supports .NET Core 2.1

The problem here is that Microsoft confused a whole lot of people with how they numbered their .NET Core SDKs.

In the original poster’s message the path C:\Program Files\dotnet\sdk\2.1.100\ DOES NOT appear to represent the .NET Core 2.1 runtime (but you’d think it does).

I came across this post The current .NET SDK does not support targeting .NET Core 2.1 on developercommunity.visualstudio.com where a Microsoft support person explains the confusion:

“Thank you for your feedback! We have determined that this issue is
not a bug. The first SDK with .NET Core 2.1 support is
2.1.300-preview1. We know the versioning is confusing which is why starting in 2.1.300, the major.minor versions of the SDK will now be
aligned with the major.minor versions of the runtime as well.”

So … in order to get .NET Core 2.1 support for building via the SDK you need to install the SDK with version 2.1.300 at least (since 2.1.2 is NOT .NET Core 2.1) … yeah, confusing. Thank you Microsoft for some lost time on this.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)