Skip to content

Conversation

@nkolev92
Copy link
Member

@nkolev92 nkolev92 commented Aug 6, 2019

Bug

Fixes: NuGet/Home#8151
Regression: No

  • Last working version:
  • How are we preventing it in future:

Fix

Details: Replaces https://github.com/NuGet/NuGet.Client/pull/2859/files.

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.

A few approaches were considered:

  • Extend on the convention based discovery, as described in previous PR and issue.
    Basically prefer .dll for netcore and .exe for netfx.
    The concern with this approach is dotnet core 3.0 SDK creates exes by default for console netcoreapp3.0 projects. Another concern is eliminating the ability to disable all plugins by specifying " ".

  • Add 2 new framework specific environment variables. Those take precedence over the generic variable.

The 2nd is the approach we are implementing.

Docs changes: NuGet/docs.microsoft.com-nuget#1599

//cc @zjrunner @zarenner

Testing/Validation

Tests Added: Yes
Reason for not adding tests:
Validation:

@zarenner
Copy link
Contributor

zarenner commented Aug 7, 2019

Looks great, excited to have this. Thanks Nikolche.

Copy link
Member

@zivkan zivkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think it would be good to change the #if to a runtime check now, rather than later when we try to reduce our TFMs.

@nkolev92 nkolev92 force-pushed the dev-nkolev92-pluginPaths branch from 66640f8 to bed471e Compare August 9, 2019 18:02
@nkolev92 nkolev92 merged commit 89310d9 into dev Aug 9, 2019
@nkolev92 nkolev92 deleted the dev-nkolev92-pluginPaths branch August 9, 2019 20:38
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.

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

4 participants