dotnet / dotnet/sdk

Support MSBuild Traversal SDK projects fully in the .NET CLI

Open
#51,874 7 comments 7 reactions 0 assignees View on GitHub
Area-CLI Area-TraversalSdk Blocking Partner untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Is your feature request related to a problem? Please describe.

While solutions are the traditional way to manage multi-project build and orchestration in the .NET ecosystem due to their IDE support, the [Traversal](https://github.com/microsoft/MSBuildSdks/tree/main/src/Traversal) MSBuild SDK is often used by large teams or power users that want more direct control of their repo-wide build experiences. These projects mimic many of the benefits of solutions, while allowing for a more natural way to express build-level dependencies, easier Target definitions, and more 'clean' alignment to traditional MSBuild semantics.

Today, Traversal projects are treated like 'normal' projects by the .NET CLI for non-MSBuild commands. Commands like `test`, `format`, `reference add`, and more attempt to interact just with the Traversal project instead of 'unwrapping' the project to discover its contained project graph - like they do for solutions.

### Describe the solution you'd like

The `dotnet` CLI should natively support traversal projects in all of its commands and experiences. It should provide patterns for contributing teams to correctly consume and work with such projects. It should enable easily creating new traversal projects.

Today many commands/tools take a single buildable 'thing' and then inspect that 'thing' to see if it is a solution or a single project. They then behave differently in both modes - typically they get a list of projects from the solution and then iterate over that list.

The core question our components need to be able to ask is "is this single buildable thing a container with N projects, or a single project?", and the answer is easy for solutions, but we need to decide on a 'protocol' for projects-that-behave-like-containers and document that protocol.

### Additional context

Traversal projects are often used by large teams inside Microsoft to make common repo-management tasks easier.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.