dotnet command-line interface, which runs on Windows, Mac OS X, and Linux, provides a number of essential nuget.exe commands as listed below. If dotnet satisfies your needs, it's not necessary to use
For complete information on
dotnet, see .NET Core command-line interface (CLI) tools.
- dotnet add package: Adds a package reference to the project file, then runs
dotnet restoreto install the package.
- dotnet remove package: Removes a package reference from the project file.
- dotnet restore: Restores the dependencies and tools of a project. As of NuGet 4.0, this runs the same code as
- dotnet nuget locals: Lists locations of the global-packages, http-cache, and temp folders and clears the contents of those folders.
- dotnet pack: Packs the code into a NuGet package. As of NuGet 4.0, this runs the same code as
- dotnet nuget push: Pushes a package to a server and publishes it, applicable to nuget.org, Visual Studio Team Services, and third-party NuGet servers.
- dotnet nuget delete: Deletes or unlists a package from a host, applicable to nuget.org, Visual Studio Team Services, and third-party NuGet servers.
Send feedback om: