[browser] Skip boot json generation in nested publish#128361
Merged
Conversation
During CoreCLR WASM nested publish, the _WriteBuildWasmBootJsonFile target (added by dotnet#125367 with Inputs/Outputs incrementalism) would write the boot JSON without VFS entries (because LinkContentToWwwroot is skipped when WasmBuildingForNestedPublish=true). Then in the outer build, the Inputs/Outputs check would find the stale output and skip regeneration, leaving the final boot JSON without VFS content files. This caused tests relying on content files (like testdataset1.xml) to fail with DirectoryNotFoundException on WASM CoreCLR. Fix: Skip _WriteBuildWasmBootJsonFile and _GenerateBuildWasmBootJson during nested publish. The nested publish doesn't need the build boot JSON (it only returns WasmAssembliesFinal/WasmNativeAsset), and skipping it ensures the outer build writes the correct boot JSON with VFS entries. Fixes dotnet#128293 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the WASM Browser SDK MSBuild targets so that build-time boot JSON generation is skipped during nested publish runs (gated by $(WasmBuildingForNestedPublish)), preventing the nested publish from producing a boot JSON that omits VFS content entries and then causing the outer build to incorrectly skip regeneration due to incremental Inputs/Outputs.
Changes:
- Add a
Condition="'$(WasmBuildingForNestedPublish)' != 'true'"gate to_WriteBuildWasmBootJsonFile. - Add the same gate to
_GenerateBuildWasmBootJsonso it doesn’t define boot-config static web asset items during nested publish. - Expand in-file comments to explain why these targets must be skipped for nested publish scenarios.
pavelsavara
approved these changes
May 19, 2026
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.
Skip
_WriteBuildWasmBootJsonFileand_GenerateBuildWasmBootJsonduring nested publish to prevent writing a stale boot JSON without VFS entries.During CoreCLR WASM nested publish, the new incrementalism (Inputs/Outputs) on
_WriteBuildWasmBootJsonFilecaused it to be skipped in the outer build after the nested publish wrote the boot JSON without VFS content. This resulted inDirectoryNotFoundExceptionfor content files liketestdataset1.xml.Regression from #125367
Relates to #128293