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

Add framework specific environment variables for plugin discovery #2986

Merged
merged 3 commits into from
Aug 9, 2019

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 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
3 participants