Skip to content

Add support for Microsoft.Build.Traversal projects #87

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
just-ero opened this issue Jan 9, 2025 · 2 comments
Open

Add support for Microsoft.Build.Traversal projects #87

just-ero opened this issue Jan 9, 2025 · 2 comments

Comments

@just-ero
Copy link

just-ero commented Jan 9, 2025

This one might be a bit of a reach, but I've heard from many people that they would like traversal projects to act as solutions. Personally, it's the ease with which projects can be included. Traversal projects could make use of the familiar MSBuild properties, items, targets, and tasks known from project files.

<Project Sdk="Microsoft.Build.Traversal/4.1.0">

  <ItemGroup>
    <ProjectReference Include="src/*/*.csproj" />
  </ItemGroup>

</Project>

I'm curious about people's alternative ideas, since I'm not optimistic that this can be supported. MSBuild projects are a lot more complicated, and using one as a solution would probably produce unexpected behavior.


I would still like to open the discussion for some format that's closer to MSBuild project files, so let me know if you have any ideas on how to perhaps use the MSBuild architecture to build a solution format that integrates with MSBuild. A possible format I've imagined is the following:

<Project Sdk="Microsoft.Build.Solution">

  <ItemGroup>
    <Configuration Include="CustomConfiguration" Platform="Any CPU" />
  </ItemGroup>

  <ItemGroup>
    <Project Include="src/*/*.csproj"
             Folder="src" />
    <Project Include="test/*/*.csproj"
             Folder="test" />

    <Project Update="test/*/*.csproj"
             Condition="'$(Configuration)' == 'Release'"
             NoBuild="true" />
  </ItemGroup>

</Project>
@richardstanton
Copy link
Member

This is currently out of scope, but the current design attempts to separate configuration data from project data to leave the door open for multi-file formats.

@just-ero
Copy link
Author

I realized a couple days after opening this issue that supporting such a format seems far out of scope for at least this repo. I'm hoping that solution support can be moved entirely into MSBuild. It appears to be a very fitting tool for the job and would make expansion of the format easier, I imagine, since MSBuild already has very well-known and established syntax and more complete features like file globbing and resolving full paths.

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

2 participants