Skip to content

Consider building a 'bare' directory #13456

@baronfel

Description

@baronfel

Summary

Given a directory tree like

/src
|_ app
    |_ app.csproj
|_ tests
    |_ tests.csproj

It would be nice if running dotnet build at the /src level would glob and create a build request that built all of the discovered projects. It would be even nicer if there was also an --exclude-glob option that could take a glob pattern, be specified multiple times, and would apply to the discovered project list.

This would reduce the need to have solutions/traversal projects to 'connect the dots', and it would also align with DevKit-level initiatives to make user actions "do the right thing" at various levels of the file system right-click menus.

Background and Motivation

The main request here is to solve a UX friction point when there is a reasonable default behavior. When a build is triggered

  • if there is not a buildable thing presented
  • and there is not a solution-like thing in the current directory
  • and there is not a project-like thing in the current directory
  • then glob the current directory and discover the things to build

Having this feature means that there is much less pressure to have slnf or traversal projects that exist only as 'stubs'.

Proposed Feature

When a build is triggered via the command line:

  • if there is not a buildable thing presented
  • and there is not a solution-like thing in the current directory
  • and there is not a project-like thing in the current directory
  • then glob the current directory and discover the things to build

Alternative Designs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: ApplicationIssues with `msbuild.exe` or the CLI experience.needs-designRequires discussion with the dev team before attempting a fix.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions