Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce NUGET_NETFX_PLUGIN_PATHS and NUGET_NETCORE_PLUGIN_PATHS to support configuration of both at same time #8151

Closed
zjrunner opened this issue May 22, 2019 · 3 comments · Fixed by NuGet/NuGet.Client#2986
Assignees
Labels
Area:Plugin V2 plugin w/ cross platform support Type:DCR Design Change Request
Milestone

Comments

@zjrunner
Copy link

NUGET_PLUGIN_PATHS can't be configured statically, to work for both nuget.exe and dotnet. If you add paths for the .exe and .dll credential providers to handle both cases, nuget fails trying to execute a dll and dotnet fails trying to execute the full framework .exe.

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
nuget.exe, dotnet.exe
NuGet version (x.x.x.xxx):
5.0.0.5856
dotnet.exe --version (if appropriate):
2.2.300
VS version (if appropriate):

OS version (i.e. win10 v1607 (14393.321)):
win10 v1903
Worked before? If so, with which NuGet version:
no

Detailed repro steps so we can see the same problem

  1. set nuget_plugin_paths=d:\tools\credprovider\plugins\netcore\CredentialProvider.Microsoft\CredentialProvider.Microsoft.dll;d:\tools\credprovider\plugins\netfx\CredentialProvider.Microsoft\CredentialProvider.Microsoft.exe
  2. (fails) nuget.exe install newtonsoft.json
  3. (fails) dotnet new web & dotnet add package newtonsoft.json
@rrelyea
Copy link
Contributor

rrelyea commented May 22, 2019

Nikolche-Proposed fix for this?

@nkolev92
Copy link
Member

Currently this is broken by design.

Here's an idea.

The convention based discovery already establish that .exe and .dll are required in the name for netfx and netcore respectively.

The one scenario we need to account for is overriding and disabling all plugins.

Currently "" overrides everything and says do not use any plugins for my nuget invocations.

Would

nuget_plugin_paths=d:\tools\credprovider\plugins\netcore\CredentialProvider.Microsoft\CredentialProvider.Microsoft.dll"

suggest that no plugins should be used for netfx, or just select the default?
Is that a scenario we even care about specific for one framework, but default for other? Do we define a special moniker?

The fix is not complex, we just need to remember to run through these scenarios.
Maybe we can learn from other tooling?

@nkolev92 nkolev92 added Area:Plugin V2 plugin w/ cross platform support Type:DCR Design Change Request Triage:NeedsTriageDiscussion labels May 22, 2019
@zjrunner
Copy link
Author

That sounds like the fix I had assigned to the issue earlier, so we're in alignment. There is a test that uses ";" to force skipping the fallback, and I originally had an empty filtered list fallback to the core discovery but founds several cases where it would make it harder to detect typo configuration. I decided to keep it as close to the current behavior w.r.t. full-override behavior, but do the simplest filter for now.

@nkolev92 nkolev92 added this to the 5.2 milestone Jun 4, 2019
@nkolev92 nkolev92 modified the milestones: 5.2, 5.3 Jul 1, 2019
@nkolev92 nkolev92 added Type:Feature and removed Type:DCR Design Change Request labels Aug 9, 2019
@rrelyea rrelyea added Type:DCR Design Change Request and removed Type:Feature labels Aug 27, 2019
@rrelyea rrelyea changed the title NUGET_PLUGIN_PATHS cannot be set to work cross framework Introduce NUGET_NETFX_PLUGIN_PATHS and NUGET_NETCORE_PLUGIN_PATHS to support configuration of both at same time Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Plugin V2 plugin w/ cross platform support Type:DCR Design Change Request
Projects
None yet
3 participants