microsoft / microsoft/vs-solutionpersistence

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

Open
#111 1 comment 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
213
Forks
14
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how this repository represents and persists .sln and .slnx solutions, then trace how the dotnet build and dotnet test commands select projects. Define the grouping syntax and filtering behavior needed for the UnitTests and Group2 examples, and consider compatibility with existing slnf files. Done means the shown commands select exactly the expected projects.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.