Conversation
…nv var and its telemetry Co-authored-by: nkolev92 <2878341+nkolev92@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Deprecate NUGET_USE_LEGACY_ASSET_TARGET_FALLBACK_DEPENDENCY_RESOLUTION in .NET 11
Deprecate NUGET_USE_LEGACY_ASSET_TARGET_FALLBACK_DEPENDENCY_RESOLUTION
Sep 18, 2026
nkolev92
marked this pull request as ready for review
September 18, 2026 18:18
zivkan
approved these changes
Sep 19, 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.
Bug
Fixes: NuGet/Home#14824
Description
NUGET_USE_LEGACY_ASSET_TARGET_FALLBACK_DEPENDENCY_RESOLUTIONwas added in 6.2 to let users opt back into the pre-6.2 (legacy) dependency resolution behavior forAssetTargetFallback. Telemetry shows 0 usage of the variable, so it's safe to remove.This PR:
_useLegacyAssetTargetFallbackBehaviorfield/branching inPackageSpecReferenceDependencyProviderandSourceRepositoryDependencyProvider. The AssetTargetFallback-aware dependency resolution (previously the default unless the variable was set totrue) now always runs unconditionally.UsesLegacyAssetTargetFallbacktelemetry event and its constant fromRestoreCommand, per the request on the linked issue to remove the telemetry alongside the variable.Clean-up of any now-unused code paths elsewhere is intentionally left as a follow-up, as noted on the issue.
PR Checklist