dotnet / dotnet/sdk

Enable building multiple projects at the command line

Open
#51,311 7 comments 1 reaction 1 assignee Claimed by @baronfel View on GitHub
Area-CLI Area-MSBuild cli-ux Partner request 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.

Today when building via the dotnet CLI, only one _thing_ is built. That _thing_ may be

* a single project
* a solution file (sln, slnx, slnf)
* a C# file-based app

However, experiences like the DevKit solutionless workspace and the Aspire polyglot effort highlight the friction this introduces in our toolchain: there is no easy, built-in way to build multiple projects without a solution file. If we had such a mechanism, it would be easier for these partners to enable a nicer UX for their users, and delay the requirement of learning about solution files for new .NET users, reducing the 'slope' of the 'required concept count over time' graph.

### Describe the solution you'd like

There should be a built-in, supported way to build multiple projects easily from the command line. This support should work for all of the current commands that logically work for a solution (this list may not be exhaustive):

* build
* clean
* test
* restore
* publish
* pack

Other gestures related to these commands, like `--property`, `--framework`, and so on should apply to all projects in the set of buildable things, to maintain existing behaviors as much as possible in this new mechanism with the existing solution/project support.

UPDATE (tmat):
To support polyglot Aspire we need `build` to be able to accept not just multiple projects but potentially a mix of multiple projects and files (`--project` and `--file` options). E.g. some resource projects in Aspire might be single-file apps others might be first class projects. They all need to be built at the same time as roots of the project graph.

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.