dotnet / dotnet/project-system

Support directory references or glob patterns for `<Folder>` in `.slnx`

Open
#9,902 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

## Problem Statement
In `.slnx` format, Solution Folders (``) require every non-project file to be explicitly enumerated using individual `` elements:

```xml




```

When referencing external folders, documentation trees, test suites, or companion codebases (e.g., C/C++ trees or scripts alongside .NET projects), maintaining static file lists creates substantial maintenance overhead whenever files are added, moved, or deleted.

## Proposed Solution
Enhance the `.slnx` schema and parser to support directory-level inclusion or globbing patterns for solution items.

### Option A: Directory reference with recursive inclusion
```xml

```

### Option B: Globbing / wildcard syntax (consistent with MSBuild project items)
```xml

```

## Benefits
1. **Zero-Maintenance Directory Inclusion**: External companion directories, shared assets, documentation trees, and C++ codebases stay automatically synchronized in the Solution Explorer.
2. **Consistency with SDK Projects**: MSBuild SDK-style projects (`.csproj`, `.fsproj`) already default to recursive wildcard includes (`**/*`); bringing similar capability to `.slnx` makes solution item management much cleaner and more intuitive.
3. **Cleaner Solution Files**: Dramatically shrinks `.slnx` file size and avoids merge conflicts on large teams.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing .slnx schema and parser handling for Folder and File elements. Compare the proposed directory-reference and glob-pattern options, then define their inclusion and path semantics before implementing one. Done means the chosen syntax is supported for solution items and its behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.