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

[Bug]: build /p:CreateBootstrap=true doesn't create a boostrap #10717

Closed
jrdodds opened this issue Sep 28, 2024 · 5 comments · Fixed by #10737
Closed

[Bug]: build /p:CreateBootstrap=true doesn't create a boostrap #10717

jrdodds opened this issue Sep 28, 2024 · 5 comments · Fixed by #10737
Assignees
Labels
Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. Documentation Issues about docs, including errors and areas we should extend (this repo and learn.microsoft.com) triaged

Comments

@jrdodds
Copy link
Contributor

jrdodds commented Sep 28, 2024

Issue Description

After running ./build.sh /p:CreateBootstrap=true or build.cmd /p:CreateBootstrap=true I expected to see a artifacts\bin\bootstrap\net9.0\MSBuild\MSBuild.dll file. The artifacts\bin\bootstrap\net9.0 is not created.

Has the bootstrap been changed? A core folder with a dotnet executable is created. Is this an expected change in behavior?

In Building-Testing-and-Debugging-on-.Net-Core-MSBuild.md there is a sentence:

Now, just point dotnet ./artifacts/bin/bootstrap/<TARGET_FRAMEWORK>/MSBuild/MSBuild.dll at a project file. (Change <TARGET_FRAMEWORK> to current target framework, for example net7.0, net8.0)

Is this document out of date? Is it now ./artifacts/bin/bootstrap/core/dotnet <project_file>?

Steps to Reproduce

  1. Run ./build.sh /p:CreateBootstrap=true (*nix) or build.cmd /p:CreateBootstrap=true (Windows)
  2. Check the contents of ``artifacts/bin/bootstrap/`

Expected Behavior

In the past a framework folder would be created within bootstrap.

Actual Behavior

A core folder with a dotnet executable is created. Is this an expected change in behavior?

Analysis

No response

Versions & Configurations

No response

@jrdodds jrdodds added the bug label Sep 28, 2024
@KirillOsenkov KirillOsenkov added the Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. label Sep 28, 2024
@KirillOsenkov
Copy link
Member

I think bootstrap was primarily targeted to produce a rehostable version of the desktop MSBuild, and it seems to be working fine for that purpose.

Assuming you cloned MSBuild at C:\MSBuild the binary would be at
C:\msbuild\artifacts\bin\bootstrap\net472\MSBuild\Current\Bin\amd64\MSBuild.exe

and the root directory would be at
C:\msbuild\artifacts\bin\bootstrap\net472

You can just zip or copy that directory and it should be self-contained. The Core MSBuild is somewhat limited (e.g. it won't build WPF projects for example).

@KirillOsenkov
Copy link
Member

To clarify: I'm not saying there isn't a bug, it may still be broken and still needs fixing. Just pointing out that the desktop version has been working fine for years for me (and I've never tried to use the Core bootstrap version)

@JanKrivanek
Copy link
Member

The behavior for .NET was improved - to create fully functional patched version - see: https://github.com/dotnet/msbuild/blob/main/documentation/wiki/Bootstrap.md#current-implementation-for-net

@KirillOsenkov - I believe you should be now able to use Core bootstrap to build WPF as well (as soon as it's possible with fresh latest release NET sdk).

@YuliiaKovalova - the doc pointed by @jrdodds might need update.

@YuliiaKovalova YuliiaKovalova self-assigned this Sep 30, 2024
@YuliiaKovalova YuliiaKovalova added Documentation Issues about docs, including errors and areas we should extend (this repo and learn.microsoft.com) and removed bug labels Sep 30, 2024
@AR-May AR-May added the triaged label Oct 1, 2024
@jrdodds
Copy link
Contributor Author

jrdodds commented Oct 3, 2024

Thanks for updating the documentation.

Quick testing shows that the artifacts/bin/bootstrap directory is now always created on a build and the CreateBootstrap property has no effect.

A search for "CreateBootstrap" across the repo turns up a few references in documentation files and build script files. Maybe these are dead files.

Regardless, the new behavior is an improvement and I'm updating my workflow.
Thanks

@JanKrivanek
Copy link
Member

CreateBootstrap wasn't having any effect before the refactoring. But it's still good point for fixing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. Documentation Issues about docs, including errors and areas we should extend (this repo and learn.microsoft.com) triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants