dotnet-add
Add a package or project reference to a .NET project
TLDR
SYNOPSIS
dotnet add [project] package|reference [arguments]
DESCRIPTION
dotnet add is the verb-first entry point for adding a NuGet package or a project-to-project reference. .NET 10 also accepts the noun-first forms dotnet package add and dotnet reference add. SDKs before .NET 10 use the verb-first form.package edits a `PackageReference` (and, under Central Package Management, the version in `Directory.Packages.props`). reference adds a `ProjectReference`. Both forms run a compatibility check and an implicit restore unless --no-restore is passed to the underlying command.
SUBCOMMANDS
package
Add or update a NuGet package reference. See dotnet-package-add and dotnet-add-package.reference
Add a project-to-project reference. See dotnet-reference-add and dotnet-add-reference.
INSTALL
CAVEATS
The noun-first forms require the .NET 10 SDK or later. On older SDKs, use dotnet add package and dotnet add reference.
SEE ALSO
dotnet(1), dotnet-package-add(1), dotnet-reference-add(1), dotnet-add-package(1), dotnet-add-reference(1), dotnet-restore(1)
