.NET Core 2.0 missing from my Visual Studio

24,688

Solution 1

Ah!

I had the following global.json in the root of my solution:

{
  "projects": [ "src", "tests" ],
  "sdk": {
    "version": "1.0.4"
  }
}

So I had to change the version from 1.0.4 to 2.0.0 and then close/re-open the solution.

Problem solved :)

Solution 2

Please make sure you use Visual Studio 2017 Update 3 (version 15.3, 26730.01): Help -> About Microsoft Visual Studio

Solution 3

In my case this was caused by another executable called "dotnet.exe" that was in my path before the one from the SDK. It seems that VS doesn't deal with this well.

Solution 4

I just ran into this issue. Reinstalling the sdk and VS didn't help. The issue ended up being an incorrect order of paths in the System Path variable. As soon as I moved C:\Program Files\dotnet\ before C:\Program Files (x86)\dotnet\ VS was able to pickup the correct sdks.

System Path variable

Solution 5

You may need to add "%USERPROFILE%\.dotnet\" to your PATH. The Entity Framework Core project mentions it.

Share:
24,688
Pure.Krome
Author by

Pure.Krome

Just another djork trying to ply his art in this mad mad world. Tech stack I prefer to use: Laguage: C# / .NET Core / ASP.NET Core Editors: Visual Studio / VS Code Persistence: RavenDB, SqlServer (MSSql or Postgres) Source control: Github Containers: Docker & trying to learn K&'s Cloud Platform: Azure Caching/CDN: Cloudflare Finally: A Tauntaun sleeping bag is what i've always wanted spaces > tabs

Updated on April 19, 2020

Comments

  • Pure.Krome
    Pure.Krome about 4 years

    So I've installed the official .NET Core 2.0 SDK and when I'm in Visual Studio i get heaps of errors and the target framework is not listed :(

    It's like .NET Core 2.0 isn't installed.

    enter image description here

    and here's the .csproj file:

    <Project Sdk="Microsoft.NET.Sdk.Web">
    
      <PropertyGroup>
        <TargetFramework>netcoreapp2.0</TargetFramework>
      </PropertyGroup>
    
      <ItemGroup>
        <Folder Include="wwwroot\" />
      </ItemGroup>
    
      <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
      </ItemGroup>
    
    </Project>
    

    also, dotnet --version returns 2.0.0

    so .. is there some install tooling I'm missing?

    EDIT/UPDATE:

    Here's my system info from VS:

    Microsoft Visual Studio Community 2017 
    Version 15.3.1
    VisualStudio.15.Release/15.3.1+26730.8
    Microsoft .NET Framework
    Version 4.7.02046
    
    Installed Version: Community
    
    Visual Basic 2017   00369-60000-00001-AA912
    Microsoft Visual Basic 2017
    
    Visual C# 2017   00369-60000-00001-AA912
    Microsoft Visual C# 2017
    
    Application Insights Tools for Visual Studio Package   8.8.00712.1
    Application Insights Tools for Visual Studio
    
    ASP.NET and Web Tools 2017   15.0.30726.0
    ASP.NET and Web Tools 2017
    
    ASP.NET Core Razor Language Services   1.0
    Provides languages services for ASP.NET Core Razor.
    
    ASP.NET Template Engine 2017   15.0.30726.0
    ASP.NET Template Engine 2017
    
    ASP.NET Web Frameworks and Tools 2017   5.2.50601.0
    For additional information, visit https://www.asp.net/
    
    Azure App Service Tools v3.0.0   15.0.30728.0
    Azure App Service Tools v3.0.0
    
    ... rest snipped.