Skip to content

Remove MSBuildAllProjects self-append from VSTest ImportAfter targets - #53763

Merged
baronfel merged 3 commits into
mainfrom
dev/drnoakes/mtp-MSBuildAllProjects
Aug 28, 2026
Merged

baronfel merged 3 commits into
mainfrom
dev/drnoakes/mtp-MSBuildAllProjects

Conversation

@drewnoakes

@drewnoakes drewnoakes commented Apr 9, 2026 •

Copy link
Copy Markdown
Member

Target files should not append themselves to MSBuildAllProjects — this property is considered harmful per MSBuildAllProjects Considered Harmful.

Changes

  • Removed $(MSBuildThisFileFullPath) self-append from MSBuildAllProjects in:
    • Microsoft.Common.targets/ImportAfter/Microsoft.TestPlatform.ImportAfter.targets
    • Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets

The MSBuildAllProjects property is no longer something that target files should add themselves to.

I tested a new, empty SDK-style project to see which files added themselves with 10.0.300-preview.26156.117, and this was the only one.
Copilot AI review requested due to automatic review settings April 9, 2026 00:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the MSBuildAllProjects self-append from the VSTest ImportAfter targets file, aligning with the guidance that imported target files should not mutate MSBuildAllProjects.

Changes:

  • Removed $(MSBuildThisFileFullPath) from MSBuildAllProjects in Microsoft.TestPlatform.ImportAfter.targets.

Copilot AI changed the title Don't add project to MSBuildAllProjects Remove MSBuildAllProjects self-append from VSTest ImportAfter targets Apr 9, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Due to lack of recent activity, this PR has been labeled as 'Stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label.

@github-actions github-actions Bot added the stale label Jun 21, 2026
@github-actions github-actions Bot closed this Jun 28, 2026
@drewnoakes drewnoakes reopened this Jun 29, 2026
@github-actions github-actions Bot removed the stale label Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Due to lack of recent activity, this PR has been labeled as 'Stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label.

@github-actions github-actions Bot added the stale label Aug 28, 2026
@baronfel
baronfel enabled auto-merge (squash) August 28, 2026 20:21
@baronfel
baronfel merged commit 1c87931 into main Aug 28, 2026
26 checks passed
@baronfel
baronfel deleted the dev/drnoakes/mtp-MSBuildAllProjects branch August 28, 2026 20:21
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 29, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — d9215539 Deployed Aug 28, 2026 by baronfel via pre_activation #1636
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants