Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 22, 2025

This PR adds a file nesting pattern for RESX (Resource) files to automatically group auto-generated Designer.cs files under their corresponding .resx files in the VS Code file explorer.

Problem

In .NET projects, RESX resource files typically have associated auto-generated Designer.cs files that contain strongly-typed accessors for the resources. For example:

  • Resources.resx has a corresponding Resources.Designer.cs
  • Strings.resx has a corresponding Strings.Designer.cs

Currently, these files appear as separate items in the VS Code file explorer, making the project structure appear cluttered and less organized.

Solution

Added a new file nesting pattern to the explorer.fileNesting.patterns configuration:

"*.resx": "${capture}.Designer.cs"

This pattern follows the same convention used by other file types in the extension (e.g., *.xaml${capture}.xaml.cs).

Result

With this change, the VS Code file explorer will now automatically nest Designer.cs files under their parent RESX files:

📁 Properties/
  📄 Resources.resx
    └── 📄 Resources.Designer.cs
📁 Localization/
  📄 Strings.resx
    └── 📄 Strings.Designer.cs
  📄 ErrorMessages.resx
    └── 📄 ErrorMessages.Designer.cs

This provides cleaner file organization and reduces visual clutter in .NET projects that use resource files, making it easier for developers to navigate their project structure.

Fixes #[issue-number]

Fixes #8643


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: timheuer <4821+timheuer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add an additional nested file mapping contribution for RESX files Add RESX file nesting pattern for Designer.cs files Sep 22, 2025
Copilot AI requested a review from timheuer September 22, 2025 21:45
Copilot finished work on behalf of timheuer September 22, 2025 21:45
Copy link
Member

@timheuer timheuer left a comment

Choose a reason for hiding this comment

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

lgtm

@timheuer timheuer marked this pull request as ready for review September 22, 2025 22:08
@timheuer timheuer requested a review from a team as a code owner September 22, 2025 22:08
@dibarbet dibarbet enabled auto-merge September 22, 2025 23:30
@dibarbet dibarbet merged commit 41e34c3 into main Sep 23, 2025
32 checks passed
@dibarbet dibarbet deleted the copilot/fix-d3cadfdc-a8a1-4048-be8f-7e91ef68f0c9 branch September 23, 2025 01:13
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.

Add an additional nested file mapping contribution for RESX files

3 participants