Skip to content

Error building the repository locally due to xcopy-msbuild version #60665

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

Closed
1 task done
benhopkinstech opened this issue Feb 28, 2025 · 0 comments · Fixed by #60666
Closed
1 task done

Error building the repository locally due to xcopy-msbuild version #60665

benhopkinstech opened this issue Feb 28, 2025 · 0 comments · Fixed by #60666

Comments

@benhopkinstech
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When using the Build ASP.NET Core source code link in the readme, at the step of running restore ./restore.cmd you will see an error relating to requiring a minimum version of MSBuild for the current version of the .NET SDK.

Version 10.0.100-preview.2.25109.3 of the .NET SDK requires at least version 17.12.0 of MSBuild. The current available version of MSBuild is 17.8.5.5502

This is preventing the local build from running successfully.

Expected Behavior

It is expected that using ./restore.cmd on the cloned fork of the project would build the repository successfully.

Steps To Reproduce

Follow the instructions in Build ASP.NET Core source code and you should see the error at the ./restore.cmd step.

Exceptions (if any)

PS D:\repos\aspnetcore> ./restore.cmd
Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected in C:\Program Files.
Note that if you are running Source Build, building NodeJS projects will be disabled later on.

  C:\Users\BenHopkins\.nuget\packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25106.4\tools\Tools.proj   Restore (6.4s)
  Runtime toolset 'dotnet/x86 v10.0.0-preview.3.25126.4' already installed.                                      (6.8s)
Restore complete (6.8s)
  RepoTasks net472 succeeded (2.1s) → artifacts\bin\RepoTasks\Release\net472\RepoTasks.dll
  RepoTasks net10.0 succeeded (3.2s) → artifacts\bin\RepoTasks\Release\net10.0\RepoTasks.dll

Build succeeded in 10.9s


  Determining projects to restore...
  Tool 'dotnet-dump' (version '6.0.322601') was restored. Available commands: dotnet-dump
  Tool 'dotnet-ef' (version '10.0.0-preview.3.25126.1') was restored. Available commands: dotnet-ef
  Tool 'dotnet-serve' (version '1.10.93') was restored. Available commands: dotnet-serve
  Tool 'microsoft.playwright.cli' (version '1.2.3') was restored. Available commands: playwright

  Restore was successful.
  Restored C:\Users\BenHopkins\.nuget\packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25106.4\tools\Tools.proj (in 532
   ms).
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error : Could not resolve SDK "Microsoft.NET.Sdk". E
xactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that messa
ge to correctly specify the SDK.
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error :   Version 10.0.100-preview.2.25109.3 of the
.NET SDK requires at least version 17.12.0 of MSBuild. The current available version of MSBuild is 17.8.5.5502. Change
the .NET SDK specified in global.json to an older version that requires the MSBuild version currently available.
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error :   The NuGetSdkResolver did not resolve this
SDK because there was no version specified in the project or global.json.
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error :   MSB4276: The default SDK resolver failed t
o resolve SDK "Microsoft.NET.Sdk" because directory "D:\repos\aspnetcore\.tools\msbuild\17.8.5\tools\MSBuild\Sdks\Micro
soft.NET.Sdk\Sdk" did not exist.
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified
 could not be found.

Build FAILED.

D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error : Could not resolve SDK "Microsoft.NET.Sdk". E
xactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that messa
ge to correctly specify the SDK.
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error :   Version 10.0.100-preview.2.25109.3 of the
.NET SDK requires at least version 17.12.0 of MSBuild. The current available version of MSBuild is 17.8.5.5502. Change
the .NET SDK specified in global.json to an older version that requires the MSBuild version currently available.
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error :   The NuGetSdkResolver did not resolve this
SDK because there was no version specified in the project or global.json.
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error :   MSB4276: The default SDK resolver failed t
o resolve SDK "Microsoft.NET.Sdk" because directory "D:\repos\aspnetcore\.tools\msbuild\17.8.5\tools\MSBuild\Sdks\Micro
soft.NET.Sdk\Sdk" did not exist.
D:\repos\aspnetcore\eng\tools\GenerateFiles\GenerateFiles.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified
 could not be found.
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:02.11
Build failed with exit code 1. Check errors above.

.NET Version

10.0.100-preview.2.25109.3

Anything else?

Upgrading xcopy-msbuild in global.json to 17.13.0 (the latest available version on dotnet-eng) resolves this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant