Skip to content

Skip nonexistent fallback folders when resolving installed package paths - #7504

Merged
jebriede merged 1 commit into
devfrom
dev-jebriede-FixFallbackFolderIssue
Jun 25, 2026
Merged

jebriede merged 1 commit into
devfrom
dev-jebriede-FixFallbackFolderIssue

Conversation

@jebriede

Copy link
Copy Markdown
Contributor

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/3665

Description

The INuGetProjectService.GetInstalledPackagesAsync and IVsPackageInstallerServices.GetInstalledPackages extensibility APIs build a FallbackPackagePathResolver to resolve installed package paths. The resolver's constructor throws a PackagingException ("Unable to find fallback package folder '{0}'.") when any configured fallback folder does not exist on disk. On these read-only paths the exception was caught and reported as a fault (vs.nuget.fault_..._FallbackPackagePathResolver..ctor__), and it aborted the entire installed-packages query.

A configured fallback folder that is missing from disk is a user misconfiguration, not a product failure, and it should not fault or block reading the installed packages. This is distinct from restore, which intentionally fails when a configured fallback folder is missing.

This change filters out fallback folders that don't exist on disk before constructing the resolver, at both extensibility read paths. Packages that can't be located simply get a null install path instead of throwing. Restore behavior is unchanged.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@jebriede
jebriede requested a review from a team as a code owner June 24, 2026 02:08
@jebriede
jebriede merged commit e38a45f into dev Jun 25, 2026
20 of 21 checks passed
@jebriede
jebriede deleted the dev-jebriede-FixFallbackFolderIssue branch June 25, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants