NuGet / Home

Repo for NuGet Client issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NuGet Docs: Improve clarify of Configuring NuGet Behavior topic (and nuget.config reference)

Mikejo5000 opened this issue · comments

NuGet Product Used

Other/NA

Product Version

N/A

Worked before?

No response

Impact

None

Repro Steps & Context

Ported from NuGet Docs repo, where we are closing out issues.
Opener: kraigb

Transferred from https://github.com/MicrosoftDocs/mvp-hackadoc-2018/issues/39

Repo: https://github.com/NuGet/docs.microsoft.com-nuget
https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior is somewhat confusing. See comments on the page.

Request is to overhaul the article to be simpler, and to check its accuracy.

Also see https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file which might need updates as well.

The main confusion is how multiple settings files work together. Primary scenario is managing sources; other scenarios are secondary.

Also need to identify exactly where config files can and do live on both Windows and Linux. Be clear on how settings are applied.

Notes:
Path mappings happen in https://github.com/NuGet/NuGet.Client/blob/ea1d1395d0c3dd7b5e22b873cfd71bb8cfb9062a/src/NuGet.Core/NuGet.Common/PathUtil/NuGetEnvironment.cs

Config used to be solution-based. .NET Core didn't have solution files, so we put config in project folder and it would work. Now with MSBuild we try to bring those things together. Machine-wide is still used on top of that.

Deprecate .nuget folder in solutions.

NuGet.Config for projects don't get applied for VS or nuget restore in the solution root, but only in the project itself.

Solution-level .config in the solution root. What does VS do with this and project .config files?

User-specific in APPDATA is accurate. Linux home/nuget, gets home/.nuget/NuGet.Config, might be ~HOME. Kill the old versions

Machine-wide config, probably ~XDG_DATA_HOME or ~/.local/share
Program Files is commonApplicationData, using ProgramData on Max/Linux, see mapping.

Include dotnet and nuget CLI commands in all examples.

Related issues to address
https://github.com/NuGet/docs.microsoft.com-nuget/issues/305
https://github.com/NuGet/docs.microsoft.com-nuget/issues/492

Verbose Logs

No response