Add framework specific environment variables for plugin discovery #2986
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug
Fixes: NuGet/Home#8151
Regression: No
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: