Pack props into buildTransitive so MTP registration flows to transitive consumers#80
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Microsoft.Testing.Platform (MTP) self-registration when GitHubActionsTestLogger is consumed transitively by ensuring the package’s .props file is available under buildTransitive/ (not just build/), allowing the TestingPlatformBuilderHook item to flow to downstream test projects.
Changes:
- Pack
GitHubActionsTestLogger.propsinto bothbuild/andbuildTransitive/so MTP registration works for transitive consumers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Please run dotnet build to fix formatting |
Contributor
Author
|
Done 😅 |
Owner
|
Thanks! |
Contributor
Author
|
👏🎉 Thank you! |
This was referenced Jul 25, 2026
This was referenced Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In Microsoft.Testing.Platform mode, the extension registers itself through the
TestingPlatformBuilderHookitem declared inGitHubActionsTestLogger.props. That props file is packed only intobuild/, and NuGet importsbuild/assets only for direct package references —buildTransitive/is the folder that flows to transitive consumers.So when the package is consumed transitively — e.g. an organization's shared testing package declares
GitHubActionsTestLoggeras a dependency so every test project gets it — the compile/runtime assets arrive fine, but the builder hook item never reaches the test project. The source-generatedSelfRegisteredExtensionsomits the extension and the reporter silently never runs.Fix
Pack the same props file into both folders:
VSTest usage is unaffected (the logger assembly already flows transitively to the build output where VSTest discovers it; the props only matter for MTP registration).
Validation
Scenario:
Consumer(xunit.v3.mtp-v2 test project) → referencesTestKit(packaged class library) → depends onGitHubActionsTestLogger. No direct reference fromConsumer.GitHubActionsTestLogger.MtpIntegration.AddExtensionsin generatedSelfRegisteredExtensions.csAlso verified the produced nupkg contains both
build/GitHubActionsTestLogger.propsandbuildTransitive/GitHubActionsTestLogger.props.