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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="lr.Dotnet.NugetConfigTool.any" Version="2026.4.18.234" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="lr.Dotnet.NugetConfigTool.any" Version="2026.4.18.234" />
                    
Directory.Packages.props
<PackageReference Include="lr.Dotnet.NugetConfigTool.any" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add lr.Dotnet.NugetConfigTool.any --version 2026.4.18.234
                    
#r "nuget: lr.Dotnet.NugetConfigTool.any, 2026.4.18.234"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package lr.Dotnet.NugetConfigTool.any@2026.4.18.234
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=lr.Dotnet.NugetConfigTool.any&version=2026.4.18.234
                    
Install as a Cake Addin
#tool nuget:?package=lr.Dotnet.NugetConfigTool.any&version=2026.4.18.234
                    
Install as a Cake Tool

lr-nuget-config

NuGet

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

  1. Repo root discovery — walks up the directory tree to find .git or nuget.config
  2. 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_URL
    • nuget.org → NUGET_ORG_NUGET_FEED_URL
    • If the env var is set, the source URL is overridden
  3. Credential merge — reads packageSourceCredentials from ~/.nuget/NuGet/NuGet.Config and merges credentials for matching source names
  4. Writes build/obj/nuget.override.config — used by RestoreConfigFile in Directory.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]
There are no supported framework assets in this package.

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