I was going to install some of the Vue samples
dotnet-new vue-next VueNextSS and keep running into the following error.
MSBuild auto-detection: using msbuild version '22.214.171.124996' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin'.
nuget : C:\dev\SS\Sample\VueNuxtSS\VueNuxtSS\VueNuxtSS.csproj : error : Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the
At line:1 char:1
+ nuget restore
+ CategoryInfo : NotSpecified: (C:\dev\SS...talled version.:String) , RemoteException
+ FullyQualifiedErrorId : NativeCommandError
\VueNuxtSS\VueNuxtSS.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.
The .NET SDK is installed 2.1.4* See image below.
Also, I'm unsure if it is related, but the
VueNuxtSS project (I think it's the Nuxt app project) fails to load in Visual Studio 2017 Professional.
If you've just installed .NET Core you should close down any command prompts so they're loaded with the new environment variables.
But otherwise I'm not sure why MSBuild can't locate your .NET Core 2.1.4 installation which suggests your PATH isn't configured correctly, maybe you need to restart?
Otherwise you can also try hard-coding the .NET Core Version number in:
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.4" />
2.1.* means to use the latest version available.
If anyone has the aforementioned error.... Go to "Add or Remove Programs" and remove the Dot Net CLI if it is installed. No reboot required after uninstall.
If dotnet cli isn't installed not sure what will fix it for you. Apparently the Dotnet CLI breaks core. Here is the relevant url. Note: I'm using VS 2017.