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

Running .\eng\build.cmd results in error when building repository #58484

Open
ShreyasJejurkar opened this issue Oct 17, 2024 · 7 comments
Open
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Comments

@ShreyasJejurkar
Copy link
Contributor

After installing JDK manually #58457 with Winget, I faced the next error when I tried to build the entire repo with build.cmd command.
I did not pass any argument to the script because I wanted to build a debug build of the entire repo for local debugging. But I encountered the below error.
Image

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Oct 17, 2024
@ShreyasJejurkar
Copy link
Contributor Author

After installing VS Community Preview 2022, the error went away. But script does not say anything what's wrong or what's missing, causing confusion.

@amcasey
Copy link
Member

amcasey commented Oct 17, 2024

Based on the stack, it looks like it's failing to find the build tool (msbuild?) path. Based on the follow-up comment about installing VS, my guess is that msbuild was simply not available. We probably just need more validation in InitializeBuildTool (or its callers?) in tools.ps1.

@amcasey
Copy link
Member

amcasey commented Oct 17, 2024

BuildFromSource.md does include "install VS" as a step. (From its description, it sounds like it may have been some C++ tools that were missing.)

@amcasey
Copy link
Member

amcasey commented Oct 17, 2024

The first error I hit was actually that Microsoft.DotNet.Arcade.MSBuild.Xcopy 17.1.0 isn't available. Updating the value in global.json seemed to work. I assume it will still blow up without VS.

@amcasey
Copy link
Member

amcasey commented Oct 17, 2024

The next error was that a particular Windows SDK wasn't installed. I installed it, rather than installing VS.

@amcasey
Copy link
Member

amcasey commented Oct 17, 2024

The next error was The VCToolsInstallDir property is not defined. I'm not sure I can work around that one without installing VS.

@amcasey
Copy link
Member

amcasey commented Oct 17, 2024

TL;DR: I didn't hit the originally reported issue (and so could not debug/fix it) but the correct fix is probably to detect VS earlier in the process and explicitly request it if it's not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

No branches or pull requests

2 participants