NancyFx / Nancy

Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono
http://nancyfx.org
MIT License
7.16k stars 1.47k forks source link

Cannot load projects in VS 2019 #2964

Closed duginov closed 5 years ago

duginov commented 5 years ago

Prerequisites

Description

In Visual Studio 2019 I cannot load any of the projects in solution

Steps to Reproduce

Clone repo, open in fresh installation of Visual Studio 2019 - all projects are in "load failed" state. Error says: C:\git\NancyFX\src\Nancy\Nancy.csproj : error : The project file cannot be opened by the project system, because it is missing some critical imports or the referenced SDK cannot be found. Detailed Information: Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.

System Configuration

VS Professional 2019 v 16.1.0; SDKs installed: 2.1.602 2.1.700 2.2.202 2.2.300

cloudhunter89 commented 5 years ago

Is your visual studio configured for .NET Core projects? It is an additional feature you have to select when installing visual studio.

On Thu, May 23, 2019 at 10:42 AM duginov notifications@github.com wrote:

Prerequisites

Description

In Visual Studio 2019 I cannot load any of the projects in solution Steps to Reproduce

Clone repo, open in fresh installation of Visual Studio 2019 - all projects are in "load failed" state. Error says: C:\git\NancyFX\src\Nancy\Nancy.csproj : error : The project file cannot be opened by the project system, because it is missing some critical imports or the referenced SDK cannot be found. Detailed Information: Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version. System Configuration

VS Professional 2019 v 16.1.0; SDKs installed: 2.1.602 2.1.700 2.2.202 2.2.300

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NancyFx/Nancy/issues/2964?email_source=notifications&email_token=ABASFFQRJ5LL24LAKO6DB4TPW3CQDA5CNFSM4HPIMBYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GVQL6MQ, or mute the thread https://github.com/notifications/unsubscribe-auth/ABASFFX2O4BFUPPNKIEA4OTPW3CQDANCNFSM4HPIMBYA .

-- Jonathon Koyle

duginov commented 5 years ago

Everything that could be (even remotely) related is already installed: https://i.imgur.com/8vSXb2c.png

xt0rted commented 5 years ago

The global.json requires 2.1.4 of the sdk so you'll need to make sure that's installed for the projects to load.

https://dotnet.microsoft.com/download/dotnet-core/2.0#sdk-2.1.4

duginov commented 5 years ago

Thanks. I didn't realize that SDK versions are misaligned with .NET Core/Runtime versions (2.1.x vs 2.0.x)