dotnet-nuget-add-source - Man Page

dotnet nuget add source

This article applies to: ✔️ .NET 6 SDK and later versions

Name

dotnet-nuget-add-source — Add a NuGet source.

Use package sources that you trust.

Synopsis

dotnet nuget add source <PACKAGE_SOURCE_PATH> [--name <SOURCE_NAME>] [--username <USER>]
    [--password <PASSWORD>] [--store-password-in-clear-text]
    [--valid-authentication-types <TYPES>] [--configfile <FILE>] [--allow-insecure-connections]

dotnet nuget add source -h|--help

Description

The dotnet nuget add source command adds a new package source to your NuGet configuration files.

[!WARNING] When adding multiple package sources, be careful not to introduce a dependency confusion vulnerability.

Arguments

Options

--configfile <FILE>
The NuGet configuration file (nuget.config) to use. If specified, only the settings from this file will be used. If not specified, the hierarchy of configuration files from the current directory will be used. For more information, see Common NuGet Configurations.

Examples

See Also

Info

2026-08-28 .NET Documentation