microsoft / microsoft/MSBuildSdks

[Traversal] Support `Platforms` as a First Class Concept

Open
#380 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
508
Forks
94
Avg merge
6h 40m
Merged PRs (30d)
2

Description

See the first example of https://github.com/dotnet/msbuild/issues/7760#issuecomment-1188463881, TraversalPlusP2PToVcxproj.zip.

This includes a traversal project that simply references all project recursively, and an AnyCPU csproj that references a vcxproj with explicit SetPlatform metadata.
Expected: When the dirs.proj is built, the vcxproj builds once, as its only platform (x64).
Traversal projects should build all platforms of the projects they directly reference.
Actual: The vcxproj builds twice: once (successfully) because of the csproj with the explicit SetPlatform metadata, and once more (failure) because the dirs.proj didn't supply any Platform global property.

The ask: The Traversal SDK should support Platforms as a first class concept, and attempt to build all ProjectReference items based on what's found in Platforms.

Questions:

  • What platform should be chosen for each referenced project? dirs.proj's typically don't have a "preferred platform" (correct me if I'm wrong), so I'm not sure how we would "just know" what to build a project as.

cc @AArnott

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 reproducing the behavior from the linked TraversalPlusP2PToVcxproj.zip example, focusing on dirs.proj, the AnyCPU csproj, and the referenced vcxproj. Read the Traversal SDK's ProjectReference handling and define how Platforms should be discovered and selected so each referenced project is built with the intended platform and without duplicate builds.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.