lr.Dotnet.NugetConfigTool.any
2026.4.18.234
dotnet add package lr.Dotnet.NugetConfigTool.any --version 2026.4.18.234
NuGet\Install-Package lr.Dotnet.NugetConfigTool.any -Version 2026.4.18.234
<PackageReference Include="lr.Dotnet.NugetConfigTool.any" Version="2026.4.18.234" />
<PackageVersion Include="lr.Dotnet.NugetConfigTool.any" Version="2026.4.18.234" />
<PackageReference Include="lr.Dotnet.NugetConfigTool.any" />
paket add lr.Dotnet.NugetConfigTool.any --version 2026.4.18.234
#r "nuget: lr.Dotnet.NugetConfigTool.any, 2026.4.18.234"
#:package lr.Dotnet.NugetConfigTool.any@2026.4.18.234
#addin nuget:?package=lr.Dotnet.NugetConfigTool.any&version=2026.4.18.234
#tool nuget:?package=lr.Dotnet.NugetConfigTool.any&version=2026.4.18.234
lr-nuget-config
A command-line tool that creates build/obj/nuget.override.config by merging your repo's nuget.config with user-level NuGet credentials and environment variable URL overrides.
Usage
Run it directly with dnx:
dnx -y lr.Dotnet.NugetConfigTool
Examples
Run in the current directory (walks up to find repo root):
dnx -y lr.Dotnet.NugetConfigTool
Run for a specific repo:
dnx -y lr.Dotnet.NugetConfigTool ~/projects/my-repo
How it works
- Repo root discovery — walks up the directory tree to find
.gitornuget.config - URL overrides — for each package source in
nuget.config, checks for an environment variable derived from the source name:DigitalHubDotnet→DIGITAL_HUB_DOTNET_NUGET_FEED_URLnuget.org→NUGET_ORG_NUGET_FEED_URL- If the env var is set, the source URL is overridden
- Credential merge — reads
packageSourceCredentialsfrom~/.nuget/NuGet/NuGet.Configand merges credentials for matching source names - Writes
build/obj/nuget.override.config— used byRestoreConfigFileinDirectory.Build.props
When to run
- After cloning a repo — run once to bootstrap the override config with your credentials
- In CI pipelines — set URL override env vars, then run before
dotnet restore
Env var naming convention
Source key names are split on PascalCase boundaries, dots, hyphens, and underscores, uppercased, and suffixed with _NUGET_FEED_URL:
| Source key | Env var |
|---|---|
DigitalHubDotnet |
DIGITAL_HUB_DOTNET_NUGET_FEED_URL |
nuget.org |
NUGET_ORG_NUGET_FEED_URL |
MyFeed-v2 |
MY_FEED_V2_NUGET_FEED_URL |
Requirements
- .NET 10.0 or later
Installation
dotnet tool install -g lr.Dotnet.NugetConfigTool
Usage after installation:
lr-nuget-config [directory]
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.4.18.234 | 116 | 4/18/2026 |
| 2026.4.18.129 | 107 | 4/18/2026 |