Version: 2021.2
public static PackageManager.Requests.RemoveRequest Remove (string packageName);

参数

packageName The name of the package to remove from the project. ArgumentException is thrown if packageName is null or empty.

返回

RemoveRequest 一个 RemoveRequest 实例,可用于监控异步操作的状态。

描述

Removes a package dependency from the project. Removing a dependency often leads to changing installed packages, but only after the Package Manager constructs a dependency graph to solve any version conflicts. For more information, see Dependency and resolution.

注意:在调用此方法之前,需确保其他所有客户端操作均已完成。有关更多信息,请参阅 Client 类参考页中的注意事项。