microsoft / microsoft/vs-solutionpersistence
[Feature idea] Add ability to group project for build/test
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
dotnet test --filter Category=UnitTests
this should build&testtest\UnitTests\UnitTests.csprojandtest\UnitTests1\UnitTests1.csprojdotnet build --filter Category=Group2
this should buildsrc\My.API1\My.API1.csprojandsrc\My.API4\My.API4.csproj
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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