Repository navigation
Hide StaticWebAssetFingerprintPattern items by default - #56359
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: oroztocil <[email protected]>
Copilot
AI
changed the title
[WIP] Fix visibility of StaticWebAssetFingerprintPattern in project tree
Hide StaticWebAssetFingerprintPattern items by default
Sep 20, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is low-risk (adds a default metadata value) and includes a targeted regression test validating the intended design-time behavior.
Review effort: Lite
Findings: None
What changed in this PR
This PR updates the Static Web Assets SDK so StaticWebAssetFingerprintPattern items default to Visible=false, preventing non-file logical-name items (e.g., JS) from appearing as project tree entries in IDEs unless explicitly overridden.
Changes:
- Add an
ItemDefinitionGroupdefaultingStaticWebAssetFingerprintPatternmetadataVisibletofalse. - Add a design-time test verifying a project-defined fingerprint pattern inherits
Visible=falsefrom the SDK defaults.
| File | Description |
|---|---|
| test/Microsoft.NET.Sdk.StaticWebAssets.Tests/StaticWebAssetsDesignTimeTest.cs | Adds a regression test asserting project-defined fingerprint patterns inherit Visible=false. |
| src/StaticWebAssetsSdk/Targets/Microsoft.NET.Sdk.StaticWebAssets.FingerprintingPatterns.props | Sets default Visible=false for StaticWebAssetFingerprintPattern items via ItemDefinitionGroup. |
oroztocil
marked this pull request as ready for review
September 21, 2026 12:36
javiercn
approved these changes
Sep 21, 2026
javiercn
left a comment
Member
There was a problem hiding this comment.
Test is pointless I think, but other than that looks good. (The only real test is showing up in VS or not)
oroztocil
enabled auto-merge
September 21, 2026 12:58
oroztocil
disabled auto-merge
September 21, 2026 13:24
oroztocil
enabled auto-merge
September 21, 2026 13:26
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.
StaticWebAssetFingerprintPatternitems use logical names such asJS, not file paths, but IDEs can still surface them as project tree entries. WebAssembly templates currently need explicitVisible="false"metadata to avoid showing these non-file items.Visible=falsemetadata forStaticWebAssetFingerprintPatternin the Static Web Assets fingerprinting patterns props.Coverage
Visible=false.Contributes to
StaticWebAssetFingerprintPatterndefined in WasmBrowser templates is visible in the project tree #56358