question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No system-wide NuGet.Config location on Linux?

See original GitHub issue

The documentation states that NuGet will use the XDG_DATA_HOME environment variable to decide where a global configuration should be. This doesn’t appear to be working, but also seems like the wrong approach to me.

Why is there not a standard system-wide configuration file in, say, /usr/local/share/ in all cases? The use case for us is that we would like to define “language level” docker images, configured for our environment (NuGet points at our artifact storage, for example). In this case we can’t specify a user, as it would constrain downstream images too much, and we also can’t use /root/.nuget because we forbid running containers as root.

Maven has this sort of scheme, and it works beautifully there. It also seems NuGet supports this, but only on Windows (%APPDATA% or thereabouts) Can the same not be done for NuGet on Linux?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
msftbot[bot]commented, Apr 7, 2023

Thanks for creating this issue! We believe this issue is related to NuGet tooling, which is maintained by the NuGet team. Thus, we closed this one and encourage you to raise this issue in the NuGet repository instead. Don’t forget to check out NuGet’s contributing guide before submitting an issue!

If you believe this issue was closed out of error, please comment to let us know.

Happy Coding!

0reactions
KalleOlaviNiemitalocommented, Apr 8, 2023

Rather unhelpful to close the issue just two days after it starts making progress.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common NuGet configurations
On Mac/Linux, the user config file location varies by tooling. .NET CLI uses ~/.nuget/NuGet folder, while Mono uses ~/.config/NuGet folder. On ...
Read more >
Changing the default system-wide location of NuGet.config ...
Is there any way to modify the default system-wide location of the NuGet.config file which points to ~/.config/NuGet/NuGet.Config in Linux?
Read more >
NuGet Configuration Inheritance
%ProgramData%\NuGet\Config*.config. The machine-wide config file located under %ProgramData%\NuGet\NuGetDefaults.config (this is a good one to put default ...
Read more >
NuGet File Locations - Matt Ward
NuGet directory and file locations across Linux, Mac and Windows operating ... Config file stores user defined NuGet package sources, ...
Read more >
Dotnet restore vs nuget restore. Share. In my code repo, there
In my code repo, there is nuget. config and PackageReference. ... We tried upgrading the NuGet version but it did not help. exe...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found