Skip to content

Error in Visual Studio if Path contains directory you do not have permission to view #14192

@afscrome

Description

@afscrome

NuGet Product Used

Visual Studio Package Management UI

Product Version

Visual Studio Version 17.13.0

Worked before?

Version 17.12 (I think) - Probably prior to NuGet/NuGet.Client#6177

Impact

It bothers me, a fix would be nice.

Repro Steps & Context

Since upgrading Visual Studio, every time we open a project, the following error appears:
Image

The path in question is for some tooling our IT team has installed - it adds itself to the machine wide path, but users don't have permissions on the file system to access the directory.

I believe this regression was introduced by NuGet/NuGet.Client#6177, specifically with https://github.com/NuGet/NuGet.Client/blob/555651e288f0276f2808dde7a40276a84b9adf3e/src/NuGet.Core/NuGet.Protocol/Plugins/PluginDiscoverer.cs#L243-L263 - it is possible for a user to have permission to see that a directory exists, but then not have permissions to view it - the loop likely needs some kind of continue on access denied logic.

Repro Steps

  1. Create a directory which you can see, but do not have permission to access
  2. Add this to the path
  3. Open Visual Studio

For reference, below are the permissions for the directory in question
Image

Verbose Logs

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error		The plugin credential providers could not be loaded.
Access to the path 'REDACTED' is denied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:PluginV2 plugin w/ cross platform supportPriority:1High priority issues that must be resolved in the current sprint.RegressionFromPreviousRTMA regression from the last RTM. Example: worked in 6.2, doesn't work in 6.3Type:Bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions