Summary
Deletes or unlists a package from a package source.
- Namespace
- Cake
.Common .Tools .NuGet - Containing Type
- NuGetAliases
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Delete")]
[CakeNamespaceImport("Cake.Common.Tools.NuGet.Delete")]
public static void NuGetDelete(this ICakeContext context, string packageID, string packageVersion, NuGetDeleteSettings settings)
Examples
NOTE: Starting with NuGet 3.4.2, the Source parameter is a mandatory parameter.
It is strongly recommended that you ALWAYS set the Source property within the NuGetDeleteSettings
instance.
// Delete the package.
NuGetDelete("PackageName", "PackageVersion", new NuGetPushSettings {
Source = "http://example.com/nugetfeed",
ApiKey = "4003d786-cc37-4004-bfdf-c4f3e8ef9b3a"
});
Attributes
Type | Description |
---|---|
Cake |
An attribute used to mark script method aliases. |
Cake |
An attribute used for documentation of alias methods/properties. |
Cake |
An attribute used to hint Cake about additional namespaces that need to be imported for an alias to work. This attribute can mark an extension method, the extension method class, or the assembly to provide a global set of imports. |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
packageID | string | The package ID (name). |
packageVersion | string | The package version. |
settings | NuGetDeleteSettings | The settings. |
Return Value
Type | Description |
---|---|
void |