Fix package validation telemetry assembly resolution warnings#13144
Merged
JanProvaznik merged 2 commits intodotnet:mainfrom Jan 29, 2026
Merged
Conversation
YuliiaKovalova
approved these changes
Jan 29, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an additional API compat search path so package validation can resolve Microsoft.VisualStudio.Telemetry.dll (referenced privately by Microsoft.Build.Framework on net472) and stop emitting resolution warnings during builds.
Changes:
- Extends
ApiCompatAdditionalSearchPathswhen package validation is enabled to include the Telemetry package’s net472 assembly directory. - Documents the rationale in
Directory.Build.targetsto clarify why the extra search path is needed.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
|
As the previous owner of APICompat & PackageValidation, a quick comment. Note that this message will get emitted with low importance starting with 11.0 as these additional assemblies aren't essential for package validation to perform correctly and in most cases just add noise. |
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.
Summary
During build, package validation emits warnings about being unable to resolve
Microsoft.VisualStudio.Telemetry.dll:This occurs because
Microsoft.Build.FrameworkreferencesMicrosoft.VisualStudio.TelemetrywithPrivateAssets="all"for net472 (to enable telemetry in Visual Studio scenarios). When package validation runs on packages likeMicrosoft.Buildthat depend on Framework, it cannot resolve this private reference.Fix
Add the telemetry package path to
ApiCompatAdditionalSearchPathsinDirectory.Build.targets, allowing the package validation to locate the assembly.Testing
.\build.cmd -v quiet- warnings no longer appear