aspnetcore: Building source code fails
Build process fails with the message saying “Could not find a version of MSBuild which satisfies the requirements specified in korebuild.json.”
To Reproduce
Steps to reproduce the behavior: Using this version of ASP.NET Core ‘v3.0.0-preview-18579-0056’
- git clone --recursive https://github.com/aspnet/AspNetCore
- git submodule update --init –recursive
- .\build.cmd
Expected behavior
All the build processes complete.
Screenshots

Additional context
Here is the console output including error message.
C:\Users\Administrator\Documents\GitHub\AspNetCore>.\build.cmd
WARNING: No default group of projects was specified, so building the 'managed' and 'native' subset of projects. Run
`build.cmd -help` for more details.
Using KoreBuild 3.0.0-build-20181214.1
WARNING: dotnet found on the system PATH is 'C:\Program Files\dotnet\dotnet.exe' but KoreBuild will use
'C:\Users\Administrator\.dotnet\x64\dotnet.exe'.
WARNING: Adding 'C:\Users\Administrator\.dotnet\x64' to system PATH permanently may be required for applications like
Visual Studio or VS Code to work correctly.
Adding C:\Users\Administrator\.dotnet\x64 to PATH
.NET Core SDK 3.0.100-preview-009750 is already installed. Skipping installation.
Could not find a version of MSBuild which satisfies the requirements specified in korebuild.json.
発生場所 C:\Users\Administrator\.dotnet\buildtools\korebuild\3.0.0-build-20181214.1\scripts\KoreBuild.psm1:511 文字:5
+ throw 'Could not find a version of MSBuild which satisfies the re ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Could not find ...korebuild.json.:String) [], RuntimeException
+ FullyQualifiedErrorId : Could not find a version of MSBuild which satisfies the requirements specified in korebu
ild.json.
The output of dotnet --info
C:\Users\Administrator\Documents\GitHub\AspNetCore>dotnet --info
A compatible SDK version for global.json version: [3.0.100-preview-009750] from [C:\Users\Administrator\Documents\GitHub\AspNetCore\global.json] was not found
Host (useful for support):
Version: 2.2.0
Commit: 1249f08fed
.NET Core SDKs installed:
1.0.4 [C:\Program Files\dotnet\sdk]
1.1.0 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.1.600-preview-009426 [C:\Program Files\dotnet\sdk]
2.2.101 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
I refer to this thread https://gitter.im/aspnet/Home/~iframe and “Desktop development with C++” has been installed.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 25 (15 by maintainers)
Please give our instructions here a try: https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md#install-pre-requistes
@natemcmaster I think we can remove Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 from the component list. It was used for building installers which I believe has been upgraded to the latest version of the win sdk.
Thanks. It appears your list of installed workloads does not include these, which are required to build this project:
https://github.com/aspnet/AspNetCore/blob/f2e6e6ff334176540ef0b3291122e359c2106d1a/korebuild.json#L17-L18
Please try running the eng/scripts/InstallVisualStudio.ps1 script to install these. (see https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md#install-pre-requistes)