Skip to content

Fix config paths#3583

Open
zivkan wants to merge 2 commits into
mainfrom
zivkan/config
Open

Fix config paths#3583
zivkan wants to merge 2 commits into
mainfrom
zivkan/config

Conversation

@zivkan

@zivkan zivkan commented Jun 24, 2026

Copy link
Copy Markdown
Member

in #3576, a customer noticed some of the paths documented were wrong. I pointed copilot at both the docs repo and the NuGet.Client repo, and told it to find all the other errors. This PR are the fixes it found.

@zivkan zivkan requested a review from a team as a code owner June 24, 2026 03:10
Copilot AI review requested due to automatic review settings June 24, 2026 03:10
@zivkan zivkan requested a review from a team as a code owner June 24, 2026 03:10
@learn-build-service-prod

Copy link
Copy Markdown

Learn Build status updates of commit ff583d9:

✅ Validation status: passed

File Status Preview URL Details
docs/consume-packages/configuring-nuget-behavior.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR corrects several documented NuGet configuration file paths across Windows, macOS, and Linux, based on customer feedback and additional repo-wide verification.

Changes:

  • Updates the computer-level config locations to distinguish macOS and Linux paths.
  • Fixes Linux examples and tables to use the ~/.nuget/NuGet/... and /etc/opt/NuGet/... conventions consistently.
  • Adjusts NuGetDefaults.Config locations to split macOS and Linux guidance.

Comment thread docs/consume-packages/configuring-nuget-behavior.md Outdated
Comment thread docs/consume-packages/configuring-nuget-behavior.md Outdated
Comment thread docs/consume-packages/configuring-nuget-behavior.md
Comment thread docs/consume-packages/configuring-nuget-behavior.md Outdated
@learn-build-service-prod

Copy link
Copy Markdown

Learn Build status updates of commit 25db681:

✅ Validation status: passed

File Status Preview URL Details
docs/consume-packages/configuring-nuget-behavior.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines 89 to +91
# Set repositoryPath in the computer-level file (requires elevation)
dotnet nuget config set repositoryPath /home/packages --configfile $XDG_DATA_HOME/NuGet.Config
# On Linux the computer-level config is under /etc/opt/NuGet/Config; on Mac it's under /Library/Application Support/NuGet/Config
dotnet nuget config set repositoryPath /home/packages --configfile /etc/opt/NuGet/Config/NuGet.Config
@zivkan zivkan self-assigned this Jun 29, 2026

@donnie-msft donnie-msft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, and I have these questions:

  1. So, is XDG_DATA_HOME not used by NuGet at all? If it is, should we keep some mention of it?
  2. Does this PR also address NuGet/Home#13596 ?


# Set repositoryPath in the computer-level file (requires elevation)
dotnet nuget config set repositoryPath /home/packages --configfile $XDG_DATA_HOME/NuGet.Config
# On Linux the computer-level config is under /etc/opt/NuGet/Config; on Mac it's under /Library/Application Support/NuGet/Config

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we quote paths for readability?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we delete this part?

On Linux, this previous location was /etc/opt, and on Mac, /Library/Application Support.

...from

- For NuGet 2.6 to 3.x, the computer-level config file on Windows was located in `%ProgramData%\NuGet\Config[\{IDE}[\{Version}[\{SKU}]]]\NuGet.Config`, where `{IDE}` can be `VisualStudio`, `{Version}` was the Visual Studio version such as `14.0`, and `{SKU}` is either `Community`, `Pro`, or `Enterprise`. To migrate settings to NuGet 4.0+, simply copy the config file to `%ProgramFiles(x86)%\NuGet\Config`. On Linux, this previous location was `/etc/opt`, and on Mac, `/Library/Application Support`.

...to potentially fix this issue?
NuGet/Home#13596

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.

3 participants