microsoft / microsoft/MSBuildSdks

Microsoft.Build.Traversal conflicts with .NET 8 SDK simplified output paths

Open
#509 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When using the new .NET 8 simplified output paths feature with multiple dirs.proj projects using Microsoft.Build.Traversal they conflict with each other. The automatic ArtifactsProjectName determined by the .NET 8 SDK for all of the projects is dirs so they end up sharing a obj path within the artifacts directory, overwriting each other.

The only workaround I have found so far is to manually set the ArtifactsProjectName differently for each project. However, this must be done before the Microsoft.Build.Traversal SDK is imported. This means the simple Sdk="Microsoft.Build.Traversal" mechanism doesn't work and props and targets must be imported separately, which is messier and more difficult.

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 conflict with multiple dirs.proj projects using Microsoft.Build.Traversal and .NET 8 simplified output paths. Compare the automatically chosen ArtifactsProjectName values and resulting artifacts/obj paths; done means the projects no longer overwrite each other without requiring manual pre-import configuration. No source files or tests are named.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.