The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 2.1.
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0)
and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4.
When I created a new web application I get an error saying
"The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 2.1."
When I try to build an existing project I get an error
"The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 2.1."
I don't see ".net core 2.1" in my target framework
I don't have global.json file in my computer
When I try dotnet --info, I get this
c:\source\dnacloud\testapp>dotnet --info .NET Command Line Tools (2.1.100)
Product Information: Version: 2.1.100 Commit SHA-1 hash: b9e74c6520
Runtime Environment: OS Name: Windows OS Version: 10.0.16299 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.100\
Microsoft .NET Core Shared Framework Host
Version : 2.0.5 Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
so i resolved the problem. the cause of the problem was that i installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4-x64 versions. the installation placed the sdk files in 'c:\Program Files\dotnet' but VS2017 was 32bit and was looking for the sdk files in 'c:\Program Files(x86)\dotnet'.
to resolved installed the x86 version of the sdk and aspnetcore runtime.
i also set the MSBuildSDKsPath environmental variable to point to the new installation path.
all obsolete sdks were also deleted from control panel
the below link helped in resolving the issue
https://stackoverflow.com/questions/45694411/visual-studio-2017-update-3-the-sdk-microsoft-net-sdk-web-specified-could-no?rq=1
Installing .NET Core SDK 2.1.300-preview2 did the trick for me.
Check for suitable version here https://dotnet.microsoft.com/download/dotnet-core/
NOTE: the problem might repeat for later versions as well. The main idea how to address the issue - get the latest version installed on your machine. Also always great to understand why you are getting this. Check my explanation here https://stackoverflow.com/a/53318706/804385
@dmitry-pavlov thanks for the tip, I was having trouble building on my dev machine as well, kept saying 2.1 wasn't a supported target even though I seemed to have SDK 2.1.2 installed, but installing 2.1.3 as you indicated above fixed the issue.
I am getting this issue with yesterdays (May 30, 2018) release. I have latest .NET SDK and .NET core SDK installed. Suggestions?
what is the output of dotnet --info from the folder where you are trying to build from? You may have a global.json file somewhere that is pinning your SDK version to an older one that does not support .NET Core 2.1
Removing netstandard2.1 from my dll framework resolved the issue. It now just has netcoreapp2.1 and net471. Does that seem odd?
There is no netstandard2.1 TFM. The latest version of netstandard is netstandard2.0.
That explains it then. Is a .dll / class library with only netcoreapp2.1 going to cause issues linking to other .dll?
You will only be able to reference it from other netcoreapp2.1 projects.
Ok it seems that .net standard 2.1 is a little more tricky. I don't think it's super critical right now. Hopefully it will be formalized and released soon.
there is no netstandard2.1. The TFM does not exist and I am not aware of plans for it.
Ah interesting. Is there any guidance on class libraries / nuget packages that want to support .net core 2.1, other than just supporting netcoreapp2.1?
Projects targetting netcoreapp2.1 can reference netstandard2.0, as netcore2.1 is a super set of it.
Ok great, thanks so much, I appreciate you taking the time.
-- Jeff
On Fri, Jun 1, 2018 at 12:09 PM, Livar [email protected] wrote:
Projects targetting netcoreapp2.1 can reference netstandard2.0, as netcore2.1 is a super set of it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dotnet/cli/issues/8743#issuecomment-393965028, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNoGORkXWwEGoDDpJGVxJ0e-P6Ei_ipks5t4YN1gaJpZM4SiYqr .
No worries. Glad I could help.
Upgrade Azure SDK worked for me, I updated SDK 2.1.400. And before update i seen my current Azure SDK by command (go to command prompt & type command (dotnet --info). after install it got changed & i could able to resolved this error.
URL for download azure SDK: - https://www.microsoft.com/net/download/dotnet-core/2.1#sdk-2.1.300-preview2
Had to install the dotnet core. I don't know why when I upgraded from 15.6.7 to 15.9.6 the .NET Core wasn't upgraded, but it wasn't. Had to install it from here:
https://dotnet.microsoft.com/download/dotnet-core/2.1
Something broken? Or is this the case of the left hand not knowing what the right is doing?
In my case this issue was solved by removing the global.json file in the parent directory from the project.
Apparently, this file targeted an older = uninstalled version from the SDK.
In my case, I resolved by installing version compatible with visual studio ( below .Net Core sdk). https://dotnet.microsoft.com/download
Help us understand the decoder ring configuring our side by side environment supporting a VS2017 build pipeline? Specifically we are targeting things like netstandard2.0 and netcoreapp2.1. Since installing VS2019, this is superseding what was once a healthy VS2017 environment. Seems like we need to introduce a global.json with an appropriate sdk.version, but we need help with the table.
We've got the following dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100\
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
2.1.104 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.401 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
2.1.403 [C:\Program Files\dotnet\sdk]
2.1.500 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.1.503 [C:\Program Files\dotnet\sdk]
2.1.504 [C:\Program Files\dotnet\sdk]
2.1.505 [C:\Program Files\dotnet\sdk]
2.1.507 [C:\Program Files\dotnet\sdk]
2.1.508 [C:\Program Files\dotnet\sdk]
2.1.509 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]