Skip to content

Hide StaticWebAssetFingerprintPattern items by default - #56359

Merged
oroztocil merged 3 commits into
mainfrom
copilot/fix-static-web-asset-visibility
Sep 21, 2026
Merged

oroztocil merged 3 commits into
mainfrom
copilot/fix-static-web-asset-visibility

Conversation

Copilot AI commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

StaticWebAssetFingerprintPattern items use logical names such as JS, not file paths, but IDEs can still surface them as project tree entries. WebAssembly templates currently need explicit Visible="false" metadata to avoid showing these non-file items.

  • SDK defaults
    • Added default Visible=false metadata for StaticWebAssetFingerprintPattern in the Static Web Assets fingerprinting patterns props.
    • Applies to SDK-provided and project/template-defined fingerprint patterns unless explicitly overridden.
<ItemDefinitionGroup>
  <StaticWebAssetFingerprintPattern>
    <Visible>false</Visible>
  </StaticWebAssetFingerprintPattern>
</ItemDefinitionGroup>

@azure-pipelines

azure-pipelines Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
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.

Copilot AI changed the title [WIP] Fix visibility of StaticWebAssetFingerprintPattern in project tree Hide StaticWebAssetFingerprintPattern items by default Sep 20, 2026
Copilot AI requested a review from oroztocil September 20, 2026 21:23
@oroztocil
oroztocil requested a lite review from Copilot September 20, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ItemDefinitionGroup defaulting StaticWebAssetFingerprintPattern metadata Visible to false.
  • Add a design-time test verifying a project-defined fingerprint pattern inherits Visible=false from 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
oroztocil marked this pull request as ready for review September 21, 2026 12:36
@oroztocil
oroztocil requested a review from a team as a code owner September 21, 2026 12:36

@javiercn javiercn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test is pointless I think, but other than that looks good. (The only real test is showing up in VS or not)

@oroztocil
oroztocil enabled auto-merge September 21, 2026 12:58
@oroztocil
oroztocil disabled auto-merge September 21, 2026 13:24
@oroztocil
oroztocil enabled auto-merge September 21, 2026 13:26
@oroztocil
oroztocil merged commit c8c2492 into main Sep 21, 2026
22 checks passed
@oroztocil
oroztocil deleted the copilot/fix-static-web-asset-visibility branch September 21, 2026 14:26
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StaticWebAssetFingerprintPattern defined in WasmBrowser templates is visible in the project tree

4 participants