Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
PadreSVK opened this issue Mar 18, 2025 · 1 comment
Open

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

PadreSVK opened this issue Mar 18, 2025 · 1 comment

Comments

@PadreSVK
Copy link

PadreSVK commented Mar 18, 2025

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
@PadreSVK
Copy link
Author

This issue could be merged with #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant