Skip to content

[Feature idea] Add ability to group project for build/test #111

@PadreSVK

Description

@PadreSVK

Hi it is possible to add ability to specify projects groups based on trait|category|group?
This could replace slnf, so instead of having several slnf files in repository we could have only one slnx file where could be projects annotated with props. i.e Category|Group...

Example

<Solution>
  <Configurations>
    <BuildType Name="Debug" />
    <BuildType Name="Release" />
  </Configurations>
  <Folder Name="/Solution Items/">
    <File Path=".editorconfig" />
    <File Path="README.md" />
    <File Path="NuGet.Config" />
    <File Path="Directory.Build.props" />
  </Folder>
  <Folder Name="/test/">
    <Project Path="test\FunctionalTests\FunctionalTests.csproj" />
    <Project Path="test\UnitTests\UnitTests.csproj" Category="UnitTests"/>
    <Project Path="test\UnitTests1\UnitTests1.csproj" Category="UnitTests"/>
  </Folder>
  <Folder Name="/src/">
    <Project Path="src\My.API\My.API.csproj" Category="Group1"/>
    <Project Path="src\My.API1\My.API1.csproj" Category="Group2"/>
    <Project Path="src\My.API2\My.API2.csproj" Category="Group1"/>
    <Project Path="src\My.API3\My.API3.csproj" Category="Group1"/>
    <Project Path="src\My.API4\My.API4.csproj" Category="Group2"/>
    <Project Path="src\My.API5\My.API5.csproj" Category="Group1"/>
  </Folder>
</Solution>

Usage

  1. dotnet test --filter Category=UnitTests
    this should build&test test\UnitTests\UnitTests.csproj and test\UnitTests1\UnitTests1.csproj
  2. dotnet build --filter Category=Group2
    this should build src\My.API1\My.API1.csproj and src\My.API4\My.API4.csproj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions