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
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:
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.
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.
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).
make sure you download the x86 SDK instead of only the x64 SDK for visual studio.
This worked for me
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
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.