2
votes

I am trying to build ASP.NET Core Source code locally. As per the instruction mentioned on https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md, when i execute

.\restore.cmd

i am getting below error

error : Version 5.0.100-alpha1-014696 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.

I have Windows 10 Pro 1903 and Visual Studio 2019 Version 16.3.5 installed.

1

1 Answers

3
votes

Make sure you have run ./eng/scripts/InstallVisualStudio.ps1 to ensure you have the tools required.

Next make sure you enable the option to use previews of the .NET Core SDK in VS2019:

Tools > Options and check Use previews of the .NET Core SDK under Environment > Preview Features

And yes, I agree, the fact that a setting in VS IDE alters a command-line build is surprising and it seems to be a common error when trying to build the source to miss this setting.

Close Visual Studio and rerun .\restore.cmd