Avoid duplicate WebAssembly publish asset compression - #68463
Merged
Conversation
Components.TestServer publishes multiple WebAssembly apps that traverse the shared Microsoft.AspNetCore.Components.WebAssembly project. Honor the existing skip property on that nested publish path so those traversals do not concurrently compress the same static web assets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR mitigates a known race during Components.TestServer publish where multiple referenced WebAssembly apps concurrently traverse Microsoft.AspNetCore.Components.WebAssembly and can attempt to compress the same static web asset outputs, causing intermittent file-lock failures.
Changes:
- Adds a conditional
_SkipReferencedProjectPublishAssetsgate to short-circuit Static Web Assets “get publish assets” traversal forMicrosoft.AspNetCore.Components.WebAssembly. - Introduces a no-op target (
_SkipGetPublishAssetsForTrimmedBuild) used as the alternate traversal target to prevent redundant/concurrent compression.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
This was referenced Aug 13, 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.
Components.TestServerpublishes multiple referenced WebAssembly apps that all traverseMicrosoft.AspNetCore.Components.WebAssembly. Those traversals can run concurrently and compress the same static web asset output, causing the file-lock failure seen in build 1550669.Extend the
_SkipReferencedProjectPublishAssetspattern from #68085 to the shared WebAssembly project so the redundant nested traversal is skipped.Related to #61178.