Skip to content

adding new CLI nuget commands #1218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Using the current-1.1 folder and sub-folders
# Using the cli-preview3 folder and sub-folders

This folder is the top-level node that matches the [docs](../welcome.md)
folder, but contains deltas for the .NET Core 1.1 release.
folder, but contains deltas for the .NET Core tooling Preview 3 release.

The goal of this separate parallel folder structure is to provide a location
for the 1.1 release related content that can be relatively easily merged into
for the Preview 3 release related content that can be relatively easily merged into
the main structure when provide version switching in the published site.

The content under this node should be a smaller document set that represents
Expand All @@ -16,9 +16,9 @@ current release.
There are two cases to adding new content for this release:

* Changes to existing documents
- Copy the existing content into a parallel folder under this structure. Make your changes, and add the modified file to the TOC for the 1.1 preview release.
- Copy the existing content into a parallel folder under this structure. Make your changes, and add the modified file to the TOC for the Preview 3 release.
* New documents
- Put the new document in the proper location, and add it to the TOC under the node for the 1.1 preview release.
- Put the new document in the proper location, and add it to the TOC under the node for the Preview 3 release.

All current release files should have the following added near the
top of the topic:
Expand Down Expand Up @@ -49,5 +49,4 @@ When the time comes, we can merge each current release into the main
[docs](../docs) folder, merge the TOC nodes, and publish as a separate doc
set. We may need to merge modifications to both the LTS version of a file
and the current release of a file, but we should be able to find those
changes relatively easily.

changes relatively easily.
82 changes: 82 additions & 0 deletions docs/cli-preview3/tools/dotnet-nuget-delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
title: dotnet-nuget-delete command | .NET Core SDK
description: The dotnet-nuget-delete command deletes or unlists a package from the server.
keywords: dotnet-nuget-delete, CLI, CLI command, .NET Core
author: karann-msft
ms.author: mairaw
manager: wpickett
ms.date: 11/11/2016
ms.topic: article
ms.prod: .net-core
ms.technology: .net-core-technologies
ms.devlang: dotnet
ms.assetid: 6ddffde4-c789-4e90-990e-d35f6a6565d4
---

#dotnet-nuget-delete

[!INCLUDE[preview-warning](../../includes/warning.md)]

## Name
`dotnet-nuget-delete` - Deletes or unlists a package from the server.

## Synopsis

`dotnet nuget delete [<package_name> <package_version>]
[--help] [--source] [--non-interactive]
[--api-key] [--force-english-output] [--verbosity] [--config-file]`

## Description

The `dotnet nuget delete` command deletes or unlists a package from the server. For NuGet.org, the action is to unlist the package.

## Options

`-h|--help`

Prints out a short help for the command.

`-s|--source <SOURCE>`

Specifies the server URL. Supported URL's for nuget.org include `http://www.nuget.org`, `http://www.nuget.org/api/v3` and `http://www.nuget.org/api/v2/package`.
For private feeds, substitute the host name (for example, `%hostname%/api/v3`).

`--non-interactive`

Does not prompt for user input or confirmations.

`-k|--api-key <API_KEY>`

The API key for the server.

`--force-english-output`

Forces command-line output to be in English.

`--verbosity <LEVEL>`

Displays this amount of details in the output. Level can be `normal`, `quiet`, or `detailed`.

`--config-file <FILE>`

A NuGet configuration file used specifically for this command, replacing other config files found by the standard config file discovery and chaining process.
The path can be absolute or relative.
For more information on config files, see [Configuring NuGet Behavior](https://docs.nuget.org/ndocs/consume-packages/configuring-nuget-behavior).

## Examples

Deletes version 1.0 of package MyPackage:

`dotnet nuget delete MyPackage 1.0`

Deletes version 1.0 of package MyPackage, not prompting user for credentials or other input:

`dotnet nuget delete MyPackage 1.0 --non-ìnteractive`

Deletes version 1.0 of package MyPackage, specifying a custom config file *./config/My.Config*:

`dotnet nuget delete MyPackage 1.0 --config-file ./config/My.Config`

Deletes version 1.0 of package MyPackage, with maximum verbosity:

`dotnet nuget delete MyPackage 1.0 --verbosity detailed`
94 changes: 94 additions & 0 deletions docs/cli-preview3/tools/dotnet-nuget-locals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: dotnet-nuget-locals command | .NET Core SDK
description: The dotnet-nuget-locals command clears or lists local NuGet resources such as http-request cache, temporary cache, or machine-wide global packages folder.
keywords: dotnet-nuget-locals, CLI, CLI command, .NET Core
author: karann-msft
ms.author: mairaw
manager: wpickett
ms.date: 11/15/2016
ms.topic: article
ms.prod: .net-core
ms.technology: .net-core-technologies
ms.devlang: dotnet
ms.assetid: 8440229e-317e-4dc1-9463-cba5fdb12c3b
---

#dotnet-nuget-locals

[!INCLUDE[preview-warning](../../includes/warning.md)]

## Name
`dotnet-nuget-locals` - Clears or lists local NuGet resources such as http-request cache, temporary cache, or machine-wide global packages folder.

## Synopsis

`dotnet nuget locals <cache_location> [--clear|--list] [--help] [--force-english-output]`

where `<cache_location>` is one of the following values: `all`, `http-cache`, `packages-cache`, `global-packages`, or `temp`.

## Description

The `dotnet nuget locals` command clears or lists local NuGet resources such as http-request cache, temporary cache, or machine-wide global packages folder.

## Arguments

`all`

Indicates that the specified operation should be applied to all the cache types, that is, http-request cache, global packages cache and temporary cache.

`http-cache`

Indicates that the specified operation should be applied only to the http-request cache. The other cache locations are not affected.

`global-packages`

Indicates that the specified operation should be applied only to the global packages cache. The other cache locations are not affected.

`temp`

Indicates that the specified operation should be applied only to the temporary cache. The other cache locations are not affected.

## Options

`-h|--help`

Prints out a short help for the command.

`-c|--clear`

The clear option is used to perform a clear operation on the specified cache type. The contents of the cache directories are deleted recursively.
The executing user/group should have permission to the files in the cache directories for the operation to be successful. If not, then an error is displayed indication the files/folders which were not cleared.

`-l|--list`

The list option is used to display the location of the specified cache type.

`--force-english-output`

Forces command-line output to be in English.

## Examples

Displays the paths of all the local cache directories, that is, http-cache directory, global-packages cache directory and temporary cache directory.

`dotnet nuget locals –l all`

Displays the path for the local http-cache directory:

`dotnet nuget locals --list http-cache`

Clears all the files in all the local cache directories, that is, http-cache directory, global-packages cache directory and temporary cache directory.

`dotnet nuget locals --clear all`

Clears all the files in local global-packages cache directory:

`dotnet nuget locals -c global-packages`

Clears all the files in local temporary cache directory:

`dotnet nuget locals -c temp`

## Troubleshooting

For information about the most commonly faced problems and errors while using the `dotnet-nuget-locals` command, see [Managing the NuGet cache](https://docs.nuget.org/ndocs/consume-packages/managing-the-nuget-cache).
117 changes: 117 additions & 0 deletions docs/cli-preview3/tools/dotnet-nuget-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
title: dotnet-nuget-push command | .NET Core SDK
description: The dotnet-nuget-push command pushes a package to the server and publishes it.
keywords: dotnet-nuget-push, CLI, CLI command, .NET Core
author: karann-msft
ms.author: mairaw
manager: wpickett
ms.date: 11/11/2016
ms.topic: article
ms.prod: .net-core
ms.technology: .net-core-technologies
ms.devlang: dotnet
ms.assetid: f54d9adf-94f8-41cc-bb52-42f7ca3be6ff
---

#dotnet-nuget-push

[!INCLUDE[preview-warning](../../includes/warning.md)]

## Name
`dotnet-nuget-push` - Pushes a package to the server and publishes it.

## Synopsis

`dotnet nuget push [<package>] [--help] [--source] [--symbols-source]
[--timeout] [--api-key] [--symbol-api-key] [--disable-buffering] [--no-symbols]
[--force-english-output] [--config-file] [--verbosity]`

## Description

The `dotnet nuget push` command pushes a package to the server and publishes it.
The push command uses server and credential details found in the system's NuGet config file, or chain of config files. For more information on config files, see [Configuring NuGet Behavior](https://docs.nuget.org/ndocs/consume-packages/configuring-nuget-behavior).
NuGet's default configuration is obtained by loading *%AppData%\NuGet\NuGet.config* (Windows) or *$HOME/.local/share* (Linux/macOS), then loading any *nuget.config* or *.nuget\nuget.config*
starting from root of drive and ending in current directory.

## Options

`-h|--help`

Prints out a short help for the command.

`-s|--source <SOURCE>`

Specifies the server URL. This option is required unless DefaultPushSource config value is set in the NuGet config file.

`--symbols-source <SOURCE>`

Specifies the symbol server URL.

`-t|--timeout <TIMEOUT>`

Specifies the timeout for pushing to a server in seconds. Defaults to 300 seconds (5 minutes). Specifying 0 also gives this default.

`-k|--api-key <API_KEY>`

The API key for the server.

`--symbol-api-key <API_KEY>`

The API key for the symbol server.

`-d|--disable-buffering`

Disables buffering when pushing to an HTTP(S) server to decrease memory usage.

`-n|--no-symbols`

Does not push symbols (even if present).

`--force-english-output`

Forces all logged output to be in English. As well as the flexibility of producing English output on a non-English machine, the consistency across platforms provided by this option is a helpful feature for
automated tools which scrape the logs for text.

`--config-file <FILE>`

A NuGet configuration file used specifically for this command, replacing other config files found by the standard config file discovery and chaining process.
The path can be absolute or relative.
For more information on config files, see [Configuring NuGet Behavior](https://docs.nuget.org/ndocs/consume-packages/configuring-nuget-behavior).

`--verbosity <LEVEL>`

Displays this amount of details in the output. Level can be `normal`, `quiet`, or `detailed`.

## Examples

Pushes foo.nupkg to default push source, providing API key:

`dotnet nuget push foo.nupkg -k 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a`

Push foo.nupkg to custom push source `http://customsource`, providing API key:

`dotnet nuget push foo.nupkg -k 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a -s http://customsource/`

Pushes foo.nupkg to default push source:

`dotnet nuget push foo.nupkg`

Pushes foo.symbols.nupkg to default symbols source:

`dotnet nuget push foo.symbols.nupkg`

Pushes foo.nupkg to default push source, specifying 360 second timeout:

`dotnet nuget push foo.nupkg --timeout 360`

Pushes all .nupkg files in current directory to default push source:

`dotnet nuget push *.nupkg`

Pushes all .nupkg files in current directory to default push source, specifying a custom config file *./config/My.Config*:

`dotnet nuget push *.nupkg --config-file ./config/My.Config`

Push all .nupkg files in current directory to default push source, with maximum verbosity:

`dotnet nuget push *.nupkg --verbosity detailed`
6 changes: 3 additions & 3 deletions docs/core/tools/dotnet-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ms.assetid: 70285a83-4103-4617-be8b-d0e1e9a4a91d
#dotnet-build

## Name
dotnet-build -- Builds a project and all of its dependencies
`dotnet-build` - Builds a project and all of its dependencies.

## Synopsis

Expand Down Expand Up @@ -76,11 +76,11 @@ Compiles for a specific framework. The framework needs to be defined in the [pro

Defines a configuration under which to build. If omitted, it defaults to `Debug`.

`-r|--runtime [RUNTIME_IDENTIFIER]`
`-r|--runtime <RUNTIME_IDENTIFIER>`

Target runtime to build for. For a list of Runtime Identifiers (RIDs) you can use, see the [RID catalog](../rid-catalog.md).

`--version-suffix [VERSION_SUFFIX]`
`--version-suffix <VERSION_SUFFIX>`

Defines what `*` should be replaced with in the version field in the [project.json](project-json.md#version) file. The format follows NuGet's version guidelines.

Expand Down
2 changes: 1 addition & 1 deletion docs/core/tools/dotnet-install-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ms.assetid: 59b9c456-2bfd-4adc-8202-a1c6a0a6c787
#dotnet-install scripts reference

## Name
dotnet-install.ps1 | dotnet-install.sh - script used to install the Command Line Interface (CLI) tools and the shared runtime
`dotnet-install.ps1` | `dotnet-install.sh` - Script used to install the Command Line Interface (CLI) tools and the shared runtime.

## Synopsis
Windows:
Expand Down
2 changes: 1 addition & 1 deletion docs/core/tools/dotnet-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ms.assetid: 263c3d05-3a47-46a6-8023-3ca16b488410
#dotnet-new

## Name
dotnet-new -- Creates a new .NET Core project in the current directory
`dotnet-new` - Creates a new .NET Core project in the current directory.

## Synopsis
`dotnet new [--help] [--type] [--lang]`
Expand Down
2 changes: 1 addition & 1 deletion docs/core/tools/dotnet-pack.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ms.assetid: 8b4b8cef-f56c-4a10-aa01-fde8bfaae53e

## Name

`dotnet-pack` - Packs the code into a NuGet package
`dotnet-pack` - Packs the code into a NuGet package.

## Synopsis

Expand Down
2 changes: 1 addition & 1 deletion docs/core/tools/dotnet-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ms.assetid: 8a7e1c52-5c57-4bf5-abad-727450ebeefd

## Name

`dotnet-publish` - Packs the application and all of its dependencies into a folder getting it ready for publishing
`dotnet-publish` - Packs the application and all of its dependencies into a folder getting it ready for publishing.

## Synopsis

Expand Down
2 changes: 1 addition & 1 deletion docs/core/tools/dotnet-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ms.assetid: 60489b25-38de-47e6-bed1-59d9f42e2d46

## Name

`dotnet-restore` - Restores the dependencies and tools of a project
`dotnet-restore` - Restores the dependencies and tools of a project.

## Synopsis

Expand Down
Loading