dotnet remove packagedotnet remove package

本主題適用於:✓ .NET Core 1.x SDK .NET Core 2.x SDKThis topic applies to: ✓ .NET Core 1.x SDK .NET Core 2.x SDK

名稱Name

dotnet remove package - 從專案檔中移除套件參考。dotnet remove package - Removes package reference from a project file.

概要Synopsis

dotnet remove [<PROJECT>] package <PACKAGE_NAME> [-h|--help]

說明Description

dotnet remove package 命令提供方便的選項,以從專案中移除 NuGet 套件參考。The dotnet remove package command provides a convenient option to remove a NuGet package reference from a project.

引數Arguments

PROJECT

指定專案檔。Specifies the project file. 如果未指定,命令會在目前的目錄中搜尋一個專案檔。If not specified, the command searches the current directory for one.

PACKAGE_NAME

要移除的套件參考。The package reference to remove.

選項Options

-h|--help

印出命令的簡短說明。Prints out a short help for the command.

範例Examples

從目前目錄中的專案移除 Newtonsoft.Json NuGet 套件:Removes Newtonsoft.Json NuGet package from a project in the current directory:

dotnet remove package Newtonsoft.Json