question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DotNet works outside of Visual Studio but not within : Error: project is configured to use .NET Core SDK version 1.0.0-preview2-003121 which is not installed or cannot be found.

See original GitHub issue

Steps to reproduce

DotNet installed and works outside of Visual Studio, but not within

Outside of Visual Studio following commands work

dotnet build
dotnet restore
dotnet run

global.json

{
  "projects": [ "src", "test" ],
    "sdk": {
        "version": "1.0.0-preview2-003121"
    }
}

  • Open solution. Visual Studio displays error:

Expected behavior

Solution loads

Actual behavior

image

project is configured to use .NET Core SDK version 1.0.0-preview2-003121 which is not installed or cannot be found. These components are required to build and run this project. Download the version of .NET Core SDK specified in global.json or update the SDK version in global.json to the version that is installed.

Environment data

dotnet --info output:

dotnet --info
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.3.9600
 OS Platform: Windows
 RID:         win81-x64

Visual Studio Version Info

Microsoft Visual Studio Community 2015
Version 14.0.25421.03 Update 3
Microsoft .NET Framework
Version 4.6.01055

Microsoft .NET Core Tools (Preview 2)   14.1.20624.0
Microsoft .NET Core Tools (Preview 2)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
blackdwarfcommented, Nov 22, 2016

Actually, scratch that, I believe this is the doc that is needed: https://github.com/aspnet/Tooling/blob/master/known-issues-vs2015.md#missing-sdk.

0reactions
manishsingh2061commented, May 21, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft Visual Studio 2019: The project file cannot be ...
I just upgraded my visual studio 2019 to latest version 16.8.3 and suddenly I am not able to load any C# project and...
Read more >
project is configured to use .NET Core SDK version 1.0.0- ...
DotNet works outside of Visual Studio but not within : Error: project is configured to use .NET Core SDK version 1.0.0-preview2-003121 which is...
Read more >
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
Visual Studio 2019 unable to locate .Net Core SDK
Step 1) First run dotnet --list-sdks from the command line (as in Grzegorz Smulko's answer). Take note of the greatest version number.
Read more >
Unable to locate the .NET SDK: The Reasons - Hamid Mosalla
In this post is about fixing the following error : "The project file cannot be opened. Unable to locate the .NET SDK" we'll...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found