dotnet add package
Add or update a .NET package reference in a project file. More information: https://learn.microsoft.com/dotnet/core/tools/dotnet-add-package.
- Add a package to the project in the current directory:
dotnet add package
- Add a package to a specific project:
dotnet add package
- Add a specific version of a package to the project:
dotnet add package
- Add a package using a specific NuGet source:
dotnet add package
- Add a package only when targeting a specific framework:
dotnet add package
- Add and specify the directory where to restore packages (
~/.nuget/packagesby default):
dotnet add package --package-directory
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
