Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crankier error : A compatible installed .NET Core SDK for global.json version [5.0.100-alpha1-014696] from [global.json] was not found #16664

Closed
Pibe93 opened this issue Oct 30, 2019 · 22 comments

Comments

@Pibe93
Copy link

@Pibe93 Pibe93 commented Oct 30, 2019

Good evening, I'm trying to run a stress test here in local development (dotnet run -- local --target-url https://localhost:44368/echo --workers 10) to see how it works because then I'll have to run a stress test on the server on which to install my server project with Asp.net core 3 with Signalr to see how many connections I can keep connected but I get this error:
A compatible installed .NET Core SDK for global.json version [5.0.100-alpha1-014696] from [C:\Users\MarcoG\Downloads\AspNetCore-master\global.json] was not found
Install the [5.0.100-alpha1-014696] .NET Core SDK or update [C:\Users\MarcoG\Downloads\AspNetCore-master\global.json] with an installed .NET Core SDK:
2.1.602 [C:\Program Files\dotnet\sdk]
2.1.801 [C:\Program Files\dotnet\sdk]
2.2.300 [C:\Program Files\dotnet\sdk]
3.0.100-preview8-013656 [C:\Program Files\dotnet\sdk]
3.0.100-preview9-014004 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk].

Thanks for support.

@BrennanConroy BrennanConroy changed the title Crankier error : A compatible installed .NET Core SDK for global.json version [5.0.100-alpha1-014696] from [C:\Users\MarcoG\Downloads\AspNetCore-master\global.json] was not found Install the [5.0.100-alpha1-014696] .NET Core SDK or update [C:\Users\MarcoG\Downloads\AspNetCore-master\global.json] with an installed .NET Core SDK: 2.1.602 [C:\Program Files\dotnet\sdk] 2.1.801 [C:\Program Files\dotnet\sdk] 2.2.300 [C:\Program Files\dotnet\sdk] 3.0.100-preview8-013656 [C:\Program Files\dotnet\sdk] 3.0.100-preview9-014004 [C:\Program Files\dotnet\sdk] 3.0.100 [C:\Program Files\dotnet\sdk] Crankier error : A compatible installed .NET Core SDK for global.json version [5.0.100-alpha1-014696] from [global.json] was not found Oct 30, 2019
@BrennanConroy

This comment has been minimized.

Copy link
Member

@BrennanConroy BrennanConroy commented Oct 30, 2019

  1. You first need to get the SDK for the repo, run "restore.cmd" in the root of the repository
  2. Follow the instructions for using dotnet from the command line in the repo https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md#using-dotnet-on-command-line-in-this-repo
@Pibe93

This comment has been minimized.

Copy link
Author

@Pibe93 Pibe93 commented Oct 30, 2019

Thank you so much BrennanConroy.
Now I look good and give feedback as soon as I tried.
Thanks again for availability.

@Pibe93

This comment has been minimized.

Copy link
Author

@Pibe93 Pibe93 commented Nov 4, 2019

Good evening,
after cloning the project and executing the ./restore.cmd command I have the following error:

C:\Users\MarcoG\source\repos\AspNetCore\eng\tools\RepoTasks\RepoTasks.csproj :  error: Version 5.0.100-alpha1-015536 of the .NET Core SDK requires at least version 16.3.0 of MSBuild. The current available version of MSBuild is 16.0.461.62831. Change the version of the .NET Core SDK specified in global.json to an older one that requires the currently available MSBuild version.
C: Username Marco G o rep netNetCore en tools RepoTasks RepoTasks.csproj: error MSB4236: the SDK 'Microsoft.NET.Sdk' specified was not found.

@BrennanConroy

This comment has been minimized.

Copy link
Member

@BrennanConroy BrennanConroy commented Nov 4, 2019

You probably need to update Visual Studio to version 16.3.

@Pibe93

This comment has been minimized.

Copy link
Author

@Pibe93 Pibe93 commented Nov 7, 2019

The version I'm using is as follows:
Visual Studio Community 2019 Preview
16.3.0 Preview 3.0

@Pibe93

This comment has been minimized.

Copy link
Author

@Pibe93 Pibe93 commented Nov 7, 2019

I need to use the Visual Studio Community version 16.3.8?

@BrennanConroy

This comment has been minimized.

Copy link
Member

@BrennanConroy BrennanConroy commented Nov 7, 2019

I'm not sure, it probably doesn't hurt to update.

@Pibe93

This comment has been minimized.

Copy link
Author

@Pibe93 Pibe93 commented Nov 8, 2019

I used visual studio enterprise latest version, the restore was successful but when I go to the Crankier folder and execute the command I always get an error on the SDK version:
A compatible installed .NET Core SDK for global.json version [5.0.100-alpha1-015536] from [C:\Users\MarcoG\source\repos\AspNetCore\global.json] was not found
Install the [5.0.100-alpha1-015536] .NET Core SDK or update [C:\Users\MarcoG\source\repos\AspNetCore\global.json] with an installed .NET Core SDK:
2.1.602 [C:\Program Files\dotnet\sdk]
2.1.801 [C:\Program Files\dotnet\sdk]
2.2.300 [C:\Program Files\dotnet\sdk]
3.0.100-preview8-013656 [C:\Program Files\dotnet\sdk]
3.0.100-preview9-014004 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]

@BrennanConroy

This comment has been minimized.

Copy link
Member

@BrennanConroy BrennanConroy commented Nov 8, 2019

restore.cmd will install the appropriate SDK for the repo in a local folder. In order to then use it on the command line as if it was installed globally you need to follow the instructions on using dotnet on the command line

@pakrym

This comment has been minimized.

Copy link
Member

@pakrym pakrym commented Nov 12, 2019

I can't build the repo using buid.ps1 either.

(AspNetCore) D:\github\aspnet\AspNetCore [master ≡]> .\build
WARNING: No default group of projects was specified, so building the 'managed' and its dependent subsets of projects.   Run `build.cmd -help` for more details.
Building of NodeJS projects is disabled since node is not detected on Path and no BuildNodeJs or NoBuildNodeJs setting is set explicitly.
WARNING: Some managed projects depend on NodeJS projects. Building NodeJS is disabled so the managed projects will      fallback to using the output from previous builds. The output may not be correct or up to date.
  Restore completed in 66.18 ms for C:\Users\pakrym\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.19558.11\too   ls\Tools.proj.
dotnet-install: .NET Core Runtime version 5.0.0-alpha1.19521.2 is already installed.
dotnet-install: Adding to current process PATH: "D:\github\aspnet\AspNetCore\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: .NET Core Runtime version 5.0.0-alpha1.19521.2 is already installed.
dotnet-install: Adding to current process PATH: "D:\github\aspnet\AspNetCore\.dotnet\x86\". Note: This change will not be visible if PowerShell was run as a child process.
D:\github\aspnet\AspNetCore\eng\tools\RepoTasks\RepoTasks.csproj : error : Version 5.0.100-alpha1-015536 of the .NET Co re SDK requires at least version 16.3.0 of MSBuild. The current available version of MSBuild is 16.0.461.62831. Change  the .NET Core SDK specified in global.json to an older version that requires the MSBuild version currently available.   D:\github\aspnet\AspNetCore\eng\tools\RepoTasks\RepoTasks.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified  could not be found.
Build failed.

VS info:

Microsoft Visual Studio Enterprise 2019 Int Preview
Version 16.5.0 Preview 1.0 [29506.190.master]
VisualStudio.16.IntPreview/16.5.0-pre.1.0+29506.190.master
Microsoft .NET Framework
Version 4.8.03752

Installed Version: Enterprise

ASP.NET and Web Tools 2019   16.5.93.57544
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019   16.5.93.57544
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   16.5.93.57544
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools   16.5.93.57544
Azure Functions and Web Jobs Tools

C# Tools   3.5.0-beta1-19554-03+1133370dc148ef0579350e28a1fca7d7050f1e1d
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

JetBrains ReSharper Ultimate 2019.3 EAP 3   Build 193.0.20191106.173614-eap03
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2019 JetBrains, Inc.

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.21016.1

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   2.0.87+gbb515bf382
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

NuGet Package Manager   5.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Snapshot Debugging Extension   1.0
Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools   16.0.61910.21130
Microsoft SQL Server Data Tools

TypeScript Tools   16.0.11106.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   3.5.0-beta1-19554-03+1133370dc148ef0579350e28a1fca7d7050f1e1d
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.4 for F# 4.6   16.4.0-beta.19504.1+e3676d75d501a2df6789ad0f5ebc310bc2cee6b5
Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions (Preview)   1.0
View, manage, and diagnose containers within Visual Studio.

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers
@BrennanConroy

This comment has been minimized.

Copy link
Member

@BrennanConroy BrennanConroy commented Nov 12, 2019

@aspnet/build have any ideas why this error would be seen with VS 16.3 or higher installed?

D:\github\aspnet\AspNetCore\eng\tools\RepoTasks\RepoTasks.csproj : error : Version 5.0.100-alpha1-015536 of the .NET Core SDK requires at least version 16.3.0 of MSBuild. The current available version of MSBuild is 16.0.461.62831. Change the .NET Core SDK specified in global.json to an older version that requires the MSBuild version currently available. D:\github\aspnet\AspNetCore\eng\tools\RepoTasks\RepoTasks.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.

@BrennanConroy

This comment has been minimized.

Copy link
Member

@BrennanConroy BrennanConroy commented Nov 13, 2019

@dougbu Those don't help with this issue.

And there is no "Use previews of the .NET Core SDK" in VS anymore (at least for internal previews)

@dougbu

This comment has been minimized.

Copy link
Member

@dougbu dougbu commented Nov 13, 2019

Those don't help with this issue.

Note the following from the error messages above. 16.0.x is too old. @Pibe93 if you have something more recent installed too, make sure that has the MSBuild individual component installed.

The current available version of MSBuild is 16.0.461.62831

there is no "Use previews of the .NET Core SDK" in VS anymore (at least for internal previews)

That choice is available only in non-preview builds of VS e.g.
image

@pakrym

This comment has been minimized.

Copy link
Member

@pakrym pakrym commented Nov 13, 2019

@dougbu please read the #16664 (comment)

I have the latest dogfood vs and dotnet sdk 5.0 on the path.

That choice is available only in non-preview builds of VS e.g.

This is not helpful.

@dougbu

This comment has been minimized.

Copy link
Member

@dougbu dougbu commented Nov 13, 2019

dotnet sdk 5.0

This is usually not sufficient since global.json requires an exact SDK as well as at least one additional runtime.

This is not helpful.

@pakrym your error message is the same as @Pibe93's:

The current available version of MSBuild is 16.0.461.62831.

I'm not sure why MSBuild is finding an earlier copy of VS. I guess it's possible restore.cmd didn't complete quite right or build.cmd and the scripts it calls aren't working as expected.

I don't usually recommend restarting from scratch but perhaps that's needed here i.e.

  1. git clean -dfx
  2. ./eng/scripts/InstallJdk.ps1
  3. ./restore.cmd
  4. ./build.cmd
@pakrym

This comment has been minimized.

Copy link
Member

@pakrym pakrym commented Nov 13, 2019

This is usually not sufficient since global.json requires an exact SDK as well as at least one additional runtime.

Yes, and the comment I've posted shows that that I have exact SDK and runtime the build requires because .\build.ps1 is the one installing them.

I don't usually recommend restarting from scratch but perhaps that's needed here i.e.

(AspNetCore) D:\github\aspnet\AspNetCore [pakrym/dp-kv-keys ≡]> git clean -dfx
Removing .dotnet/
Removing .tools/
Removing artifacts/
Removing src/DataProtection/.vs/
(AspNetCore) D:\github\aspnet\AspNetCore [pakrym/dp-kv-keys ≡]> ./eng/scripts/InstallJdk.ps1
Starting download of JDK 11.0.3
Done downloading JDK 11.0.3
Expanded JDK to D:\github\aspnet\AspNetCore\obj
Installing JDK to D:\github\aspnet\AspNetCore\.tools\jdk\win-x64\
Done installing JDK to D:\github\aspnet\AspNetCore\.tools\jdk\win-x64\
(AspNetCore) D:\github\aspnet\AspNetCore [pakrym/dp-kv-keys ≡]> ./restore.cmd
Building of NodeJS projects is disabled since node is not detected on Path and no BuildNodeJs or NoBuildNodeJs setting is set explicitly.
WARNING: Some managed projects depend on NodeJS projects. Building NodeJS is disabled so the managed projects will fallback
to using the output from previous builds. The output may not be correct or up to date.
Detected JDK in D:\github\aspnet\AspNetCore\.tools\jdk\win-x64\ (via local repo convention)
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-alpha1-015536/dotnet-sdk-5.0.100-alpha1-015536-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-alpha1-015536/dotnet-sdk-5.0.100-alpha1-015536-win-x64.zip
dotnet-install: Adding to current process PATH: "D:\github\aspnet\AspNetCore\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Installation finished
Downloading vswhere
Downloading RoslynTools.MSBuild 16.0.0-alpha
  Restore completed in 357.63 ms for C:\Users\pakrym\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.19558.11\tools\To
  ols.proj.
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.0-alpha1.19521.2/dotnet-runtime-5.0.0-alpha1.19521.2-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.0-alpha1.19521.2/dotnet-runtime-5.0.0-alpha1.19521.2-win-x64.zip
dotnet-install: Installation finished
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.0-alpha1.19521.2/dotnet-runtime-5.0.0-alpha1.19521.2-win-x86.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.0-alpha1.19521.2/dotnet-runtime-5.0.0-alpha1.19521.2-win-x86.zip
dotnet-install: Adding to current process PATH: "D:\github\aspnet\AspNetCore\.dotnet\x86\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Installation finished
D:\github\aspnet\AspNetCore\eng\tools\RepoTasks\RepoTasks.csproj : error : Version 5.0.100-alpha1-015536 of the .NET Core SDK  requires at least version 16.3.0 of MSBuild. The current available version of MSBuild is 16.0.461.62831. Change the .NET Cor e SDK specified in global.json to an older version that requires the MSBuild version currently available.
D:\github\aspnet\AspNetCore\eng\tools\RepoTasks\RepoTasks.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could  not be found.
Build failed.
@dougbu

This comment has been minimized.

Copy link
Member

@dougbu dougbu commented Nov 13, 2019

@pakrym new guess: Run eng/scripts/InstallVisualStudio.ps1 with whatever parameters are needed for your latest VS installation (check help eng/scripts/InstallVisualStudio.ps1 -full).

@pakrym

This comment has been minimized.

Copy link
Member

@pakrym pakrym commented Nov 13, 2019

Sorry but I don't need a new 16.3.9 installation or is 16.5.0 not supported in this repo?

@dougbu

This comment has been minimized.

Copy link
Member

@dougbu dougbu commented Nov 13, 2019

My point wasn't to install a new version of VS. Instead, I was suggesting some mandatory option might be missing.

@pakrym

This comment has been minimized.

Copy link
Member

@pakrym pakrym commented Nov 14, 2019

Installing additional options didn't help.

@pranavkm

This comment has been minimized.

Copy link
Member

@pranavkm pranavkm commented Dec 5, 2019

The second error is a dup of #17083. Closing since we have a resolution for 5.0. For older branches, #17083 (comment) has a workaround.

@pranavkm pranavkm closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.