The current .NET SDK does not support targeting .NET Standard 2.0 error in Visual Studio 2017 update 15.3

前端 未结 14 2501
南旧
南旧 2020-12-13 05:07

I want to create a class library project with Target Framework .NET Standard 2.0.

I\'ve updated my Visual Studio 2017 to Version 15.3 and

相关标签:
14条回答
  • 2020-12-13 05:58

    When I upgraded Visual Studio to version 15.5.1, .Net Core SDK was upgraded to 2.X, so this error went away. When I run dotnet --info, I see the following now:

    0 讨论(0)
  • 2020-12-13 05:58

    I just went through this trouble. In my case I had a working script

    SET devenvPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe
    "%devenvPath%" mySolution.sln /Rebuild "DebugWithUT|AnyCpu" /Out mySolution.Build.log
    

    Today I started getting this exact error. But now I remember installing VS2019 day before. Looks like it changed something for VS2017. I went to VS2017 Update, installed latest version/update and it fixed it back.

    0 讨论(0)
  • 2020-12-13 06:00

    This happens sometimes when I'm trying to open my old projects, what helps me is to change projects target framework. Go to Project -> projectname Properties... and change the Target framework to the one that you have installed.

    0 讨论(0)
  • 2020-12-13 06:00

    Actually, to me it happened in opposite way to another answers.

    I did install the latest .NET Core SDK before the issue appeared (3.0.0-preview2 in my case) having not the latest version of Visual Studio (not sure if that would make any difference).

    So, the solution was just to uninstall that latest .NET Core SDK. (This is not perfect if you need it, so you might consider Visual Studio upgrade to the latest one, but at least that solved ongoing issue).

    0 讨论(0)
  • 2020-12-13 06:00

    make sure you download the x86 SDK instead of only the x64 SDK for visual studio.

    0 讨论(0)
  • 2020-12-13 06:02

    This worked for me

    Use the installation of the Visual Studio

    On the tab "Workloads" check ".Net Core cross-platform development" and click on "Modify"

    Don't forget to check ".NET Core 2.0 development tools" on the left menu.

    Source

    Note

    I installed the Asp Net Core before, however not appeared on my Visual Studio, just after I installed using the installation of Visual Studio appeared for me.

    0 讨论(0)
提交回复
热议问题