Add fast minimal build scripts for faster development iteration#15
Open
JanProvaznik wants to merge 17 commits intomainfrom
Open
Add fast minimal build scripts for faster development iteration#15JanProvaznik wants to merge 17 commits intomainfrom
JanProvaznik wants to merge 17 commits intomainfrom
Conversation
I detected changes in the vs18.3 branch which have not been merged yet to main. I'm a robot and am configured to help you automatically keep main up to date, so I've opened this PR. This PR merges commits made on vs18.3 by the following committers: * @GangWang01 * @github-actions[bot] * @dotnet-maestro[bot] * @YuliiaKovalova * @dotnet-bot * @nohwnd * @Copilot ## Instructions for merging from UI This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, *not* a squash or rebase commit. <img alt="merge button instructions" src="https://i.imgur.com/GepcNJV.png" width="300" /> If this repo does not allow creating merge commits from the GitHub UI, use command line instructions. ## Instructions for merging via command line Run these commands to merge this pull request from the command line. ``` sh git fetch git checkout vs18.3 git pull --ff-only git checkout main git pull --ff-only git merge --no-ff vs18.3 # If there are merge conflicts, resolve them and then run git merge --continue to complete the merge # Pushing the changes to the PR branch will re-trigger PR validation. git push https://github.com/dotnet/msbuild HEAD:merge/vs18.3-to-main ``` <details> <summary>or if you are using SSH</summary> ``` git push git@github.com:dotnet/msbuild HEAD:merge/vs18.3-to-main ``` </details> After PR checks are complete push the branch ``` git push ``` ## Instructions for resolving conflicts :warning: If there are merge conflicts, you will need to resolve them manually before merging. You can do this [using GitHub][resolve-github] or using the [command line][resolve-cli]. [resolve-github]: https://help.github.com/articles/resolving-a-merge-conflict-on-github/ [resolve-cli]: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ ## Instructions for updating this pull request Contributors to this repo have permission update this pull request by pushing to the branch 'merge/vs18.3-to-main'. This can be done to resolve conflicts or make other changes to this pull request before it is merged. The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote. ``` git fetch git checkout -b merge/vs18.3-to-main origin/main git pull https://github.com/dotnet/msbuild merge/vs18.3-to-main (make changes) git commit -m "Updated PR with my changes" git push https://github.com/dotnet/msbuild HEAD:merge/vs18.3-to-main ``` <details> <summary>or if you are using SSH</summary> ``` git fetch git checkout -b merge/vs18.3-to-main origin/main git pull git@github.com:dotnet/msbuild merge/vs18.3-to-main (make changes) git commit -m "Updated PR with my changes" git push git@github.com:dotnet/msbuild HEAD:merge/vs18.3-to-main ``` </details> Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues. Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1. --------- Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Gang Wang <v-gaw@microsoft.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: huulinh99 <huulinhnguyen99@gmail.com> Co-authored-by: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com> Co-authored-by: Jakub Jareš <me@jakubjares.com> Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com> Co-authored-by: Jan Provazník <janprovaznik@microsoft.com> Co-authored-by: dotnet bot <dotnet-bot@dotnetfoundation.org> Co-authored-by: Nguyen Huu Linh <43189610+huulinhnguyen-dev@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I detected changes in the vs18.3 branch which have not been merged yet to main. I'm a robot and am configured to help you automatically keep main up to date, so I've opened this PR. This PR merges commits made on vs18.3 by the following committers: * @dotnet-maestro[bot] * @GangWang01 * @github-actions[bot] * @YuliiaKovalova * @dotnet-bot * @nohwnd * @Copilot ## Instructions for merging from UI This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, *not* a squash or rebase commit. <img alt="merge button instructions" src="https://i.imgur.com/GepcNJV.png" width="300" /> If this repo does not allow creating merge commits from the GitHub UI, use command line instructions. ## Instructions for merging via command line Run these commands to merge this pull request from the command line. ``` sh git fetch git checkout vs18.3 git pull --ff-only git checkout main git pull --ff-only git merge --no-ff vs18.3 # If there are merge conflicts, resolve them and then run git merge --continue to complete the merge # Pushing the changes to the PR branch will re-trigger PR validation. git push https://github.com/dotnet/msbuild HEAD:merge/vs18.3-to-main ``` <details> <summary>or if you are using SSH</summary> ``` git push git@github.com:dotnet/msbuild HEAD:merge/vs18.3-to-main ``` </details> After PR checks are complete push the branch ``` git push ``` ## Instructions for resolving conflicts :warning: If there are merge conflicts, you will need to resolve them manually before merging. You can do this [using GitHub][resolve-github] or using the [command line][resolve-cli]. [resolve-github]: https://help.github.com/articles/resolving-a-merge-conflict-on-github/ [resolve-cli]: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ ## Instructions for updating this pull request Contributors to this repo have permission update this pull request by pushing to the branch 'merge/vs18.3-to-main'. This can be done to resolve conflicts or make other changes to this pull request before it is merged. The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote. ``` git fetch git checkout -b merge/vs18.3-to-main origin/main git pull https://github.com/dotnet/msbuild merge/vs18.3-to-main (make changes) git commit -m "Updated PR with my changes" git push https://github.com/dotnet/msbuild HEAD:merge/vs18.3-to-main ``` <details> <summary>or if you are using SSH</summary> ``` git fetch git checkout -b merge/vs18.3-to-main origin/main git pull git@github.com:dotnet/msbuild merge/vs18.3-to-main (make changes) git commit -m "Updated PR with my changes" git push git@github.com:dotnet/msbuild HEAD:merge/vs18.3-to-main ``` </details> Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues. Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1. --------- Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Gang Wang <v-gaw@microsoft.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: huulinh99 <huulinhnguyen99@gmail.com> Co-authored-by: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com> Co-authored-by: Jakub Jareš <me@jakubjares.com> Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com> Co-authored-by: Jan Provazník <janprovaznik@microsoft.com> Co-authored-by: dotnet bot <dotnet-bot@dotnetfoundation.org> Co-authored-by: Nguyen Huu Linh <43189610+huulinhnguyen-dev@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…: Build ID 13167444 (dotnet#13117) This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
dotnet#12978) Co-authored-by: Naresh Joshi <Naresh.Joshi@microsoft.com>
…sions when older versions are requested. (dotnet#12909) Fixes # Change version check from != to < to allow loading newer assembly versions when older versions are requested. dotnet#12370 ### Context MSBuildLoadContext was using exact version matching (!=) when loading assemblies, preventing version roll-forward. This caused tasks to fail when requesting an older assembly version even though a newer compatible version was available. ### Changes Made - Changed version comparison in MSBuildLoadContext.cs from `!=` to `<` (line 86) - Added unit test `MSBuildLoadContext_AcceptsNewerAssemblyVersions` in TaskBuilder_Tests.cs - Added test task `ValidateAssemblyVersionRollForward` in AssemblyLoadContextTestTasks.cs ### Testing - Added unit test that verifies assembly version roll-forward behavior - Test requests System.Collections.Immutable v1.0.0.0 and verifies newer version loads successfully - Test only runs on platforms with FEATURE_ASSEMBLYLOADCONTEXT (.NET Core/.NET 5+) ### Notes This change allows MSBuildLoadContext to accept any assembly version >= requested version, matching standard .NET assembly loading behavior. Co-authored-by: Jan Provazník <janprovaznik@microsoft.com>
Fixes dotnet#13041 ### Context At this moment we have multiple different patterns of using `Microsoft.IO` namespace from `Microsoft.IO.Redist`. ### Changes Made Refactored `Microsoft.IO` namespace usage. ### Testing unit tests
…: Build ID 13185812 (dotnet#13128) This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.
Fixes dotnet#13082 ### Context removing a commented out code as described in the ticket.
Update VersionPrefix to 18.5.0 + insertion flow --------- Co-authored-by: Rainer Sigwald <raines@microsoft.com>
[Automated] Update the MicrosoftBuildVersion defaultValue in the template.json. Co-authored-by: github-actions <github-actions@github.com>
Fixes dotnet#13114 - Add localization infrastructure to Microsoft.Build.Framework assembly - Create Resources/Strings.resx with PathMustNotBeNullOrEmpty and PathMustBeRooted strings - Add FrameworkResources class (in AssemblyResources.cs) to access resources Note: Class named FrameworkResources to avoid InternalsVisibleTo conflicts - Update AbsolutePath.cs to use localized strings - Add xlf translation files for all supported languages - Add tests with [UseInvariantCulture] to verify error messages
## Summary Add build-minimal.cmd/sh scripts that build only the core MSBuild runtime without tests, samples, or package projects. This enables significantly faster build times during development. ## Benchmark Results (on dev machine) | Scenario | Time | |----------|------| | Full build (cold) | 2:04 | | Full build (incremental) | 0:24 | | Minimal build with bootstrap (cold) | 1:16 | | Minimal build with bootstrap (incremental) | 0:16 | | Minimal build without bootstrap (incremental) | 0:12 | | Minimal build .NET Core only (incremental) | 0:09 | ## Changes - build-minimal.cmd / build-minimal.sh: New scripts with options: - -nobootstrap: Skip bootstrap for fastest iteration - -netcore/-core: Build only .NET Core (net10.0) - -netfx: Build only .NET Framework (net472) - -release: Release configuration - MSBuild.Minimal.slnf: Solution filter for faster IDE load - eng/BootStrapMsBuild.targets: Add SkipUnchangedFiles for incremental bootstrap - benchmark-build.cmd: Objective benchmark script - documentation/wiki/Fast-Builds.md: Documentation
Owner
Author
|
a good direction though it does not work to build per-tfm! |
…ions - Add /p:UsingToolIbcOptimization=false and /p:UsingToolVisualStudioIbcTraining=false to fix VSSetup directory not found errors - Remove -netcore/-netfx options as they don't work with solution filters (NuGet restore traverses the entire project graph regardless of filter) - Update documentation to match available options
- -core: Build only net10.0 (~3-15 seconds) - -netfx: Build only net472 (~12-40 seconds) - Uses Visual Studio MSBuild.exe with /p:TargetFramework - Builds both MSBuild.csproj and MSBuild.Bootstrap.csproj - Requires prior restore (run build-minimal.cmd once first) Validated with test markers that changes to XMake.cs are correctly reflected in both bootstrap executables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
build-minimal.cmd/build-minimal.shscripts that build only the core MSBuild runtime without tests, samples, or package projects. This enables significantly faster build times during development.Benchmark Results
Changes
New Scripts:
build-minimal.cmd/build-minimal.shBuilds only core runtime assemblies (no tests, samples, or packages):
Options:
-nobootstrap- Skip bootstrap for fastest iteration-netcore/-core- Build only .NET Core (net10.0)-netfx- Build only .NET Framework (net472)-release- Release configurationOther Changes
MSBuild.Minimal.slnf- Solution filter for faster IDE load timeseng/BootStrapMsBuild.targets- AddedSkipUnchangedFiles="true"to Copy task for incremental bootstrapbenchmark-build.cmd- Objective benchmark script for measuring build timesdocumentation/wiki/Fast-Builds.md- Documentation for fast build workflowsUsage
For day-to-day development:
.\build-minimal.cmdonce to create the bootstrap environment.\build-minimal.cmd -nobootstrapfor fast rebuilds (~9-12 seconds).\build.cmd -testbefore submitting PRs