Skip to content

Conversation

@kasperk81
Copy link
Contributor

Adds glob pattern support to File and Project Path attributes without requiring schema changes. Users can include items using standard glob patterns (e.g., Path="**/*.cs" to match all C# files recursively) and exclude them using the ! prefix (e.g., Path="!**/bin/**" to exclude build output directories). Patterns are expanded at parse time using Microsoft.Extensions.FileSystemGlobbing, preserving the user's original file ordering and path separators.

Fix #61

Adds glob pattern support to File and Project Path attributes without
requiring schema changes. Users can include items using standard glob
patterns (e.g., `Path="**/*.cs"` to match all C# files recursively)
and exclude them using the `!` prefix (e.g., `Path="!**/bin/**"` to
exclude build output directories). Patterns are expanded at parse time
using Microsoft.Extensions.FileSystemGlobbing, preserving the user's
original file ordering and path separators.
@richardstanton
Copy link
Member

Globbing also needs support in Visual Studio, C# Dev Kit and all other consumers to work correctly. As called out in the Contributing.md updates need to be coordinated with all consumers before we could take a change like this.

@kasperk81
Copy link
Contributor Author

kasperk81 commented Dec 2, 2025

@richardstanton, no problem, this can wait until coordination is done. They can use this branch to test with various patterns.

btw, msbuild has globbing support since 2017 and VS just shows the loading bar a bit longer for overly relaxed (or poorly authored) patterns like if someone puts root of drive (C:\**\*proj <- it's clearly a user fault). I hope it won't be a major blocker in VS with 8+ years of msbuild globbing experience.

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.

Feature Request: Add Globbing Pattern Support for Files in .slnx

2 participants