Skip to content

Commit 2f9b609

Browse files
author
Kraig Brockschmidt
authored
Merge pull request NuGet#589 from NuGet/master
Merge master to live
2 parents b233332 + 0006922 commit 2f9b609

28 files changed

+303
-278
lines changed

docs/API/package-base-address-resource.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ GET {@id}/{LOWER_ID}/{LOWER_VERSION}/{LOWER_ID}.{LOWER_VERSION}.nupkg
113113

114114
### Request parameters
115115

116-
Name | In | Type | Required | Notes
117-
------------- | ------ | ------- | -------- | -----
118-
LOWER_ID | URL | string | yes | The package ID, lowercase
119-
LOWER_VERSION | URL | integer | yes | The package version, normalized and lowercased
116+
Name | In | Type | Required | Notes
117+
------------- | ------ | ------ | -------- | -----
118+
LOWER_ID | URL | string | yes | The package ID, lowercase
119+
LOWER_VERSION | URL | string | yes | The package version, normalized and lowercased
120120

121121
Both `LOWER_ID` and `LOWER_VERSION` are lowercased using the rules implemented by .NET's
122122
[`System.String.ToLowerInvariant()`](https://msdn.microsoft.com/en-us/library/system.string.tolowerinvariant.aspx)

docs/API/registration-base-url-resource.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Name | Type | Required | Notes
139139
count | integer | yes | The number of registration leaves in the page
140140
items | array of objects | no | The array of registration leaves and their associate metadata
141141
lower | string | yes | The lowest SemVer 2.0.0 version in the page (inclusive)
142-
parent | string | yes | The URL to the registration index
142+
parent | string | no | The URL to the registration index
143143
upper | string | yes | The highest SemVer 2.0.0 version in the page (inclusive)
144144

145145
The `lower` and `upper` bounds of the page object are useful when the metadata for a specific page version is needed.
@@ -148,6 +148,8 @@ These bounds can be used to fetch the only registration page needed. The version
148148
build metadata. As with all versions in the NuGet ecosystem, comparison of version strings is implemented using
149149
[SemVer 2.0.0's version precedence rules](http://semver.org/spec/v2.0.0.html#spec-item-11).
150150

151+
The `parent` property will only appear if the registration page object has the `items` property.
152+
151153
If the `items` property is not present in the registration page object, the URL specified in the `@id` must be used to
152154
fetch metadata about individual package versions. The `items` array is sometimes excluded from the page
153155
object as an optimization. If the number of versions of a single package ID is very large, then the registration index

docs/Consume-Packages/Configuring-NuGet-Behavior.md

Lines changed: 114 additions & 133 deletions
Large diffs are not rendered by default.

docs/Consume-Packages/Dependency-Resolution.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ By default, NuGet 2.7 and earlier resolves the highest *patch* version (using th
129129
The `packages.config` process for resolving dependencies gets complicated for larger dependency graphs. Each new package installation requires a traversal of the whole graph and raises the chance for version conflicts. When a conflict occurs, installation is stopped, leaving the project in an indeterminate state, especially with potential modifications to the project file itself. This is not an issue when using other package reference formats.
130130

131131

132+
## Managing dependency assets
133+
134+
When using the `project.json` or PackageReference formats, you can control which assets from dependencies flow into the top-level project. For details, see [project.json](../Schema/project-json.md) and [Package references in project files](Package-References-in-Project-Files.md#controlling-dependency-assets).
135+
136+
When the top-level project is itself a package, you also have control over this flow by using the `include` and `exclude` attributes with dependencies listed in the `.nuspec` file. See [.nuspec Reference - Dependencies](../Schema/nuspec.md#dependencies).
137+
132138
## Excluding references
133139

134140
There are scenarios in which assemblies with the same name might be referenced more than once in a project, producing design-time and build-time errors. Consider a project that contains a custom version of `C.dll`, and references Package C that also contains `C.dll`. At the same time, the project also depends on Package B which also depends on Package C and `C.dll`. As a result, NuGet can't determine which `C.dll` to use, but you can't just remove the project's dependency on Package C because Package B also depends on it.

docs/Consume-Packages/Overview-and-Workflow.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
11
---
2-
# required metadata
3-
42
title: Overview and workflow of using NuGet packages | Microsoft Docs
53
author: kraigb
64
ms.author: kraigb
75
manager: ghogen
8-
ms.date: 6/6/2017
6+
ms.date: 06/06/2017
97
ms.topic: article
108
ms.prod: nuget
11-
#ms.service:
129
ms.technology: null
1310
ms.assetid: 3c60f920-457d-4f43-9efe-210c514e5242
14-
15-
# optional metadata
16-
1711
description: An overview of the process of consuming NuGet packages in a project, with links to other specific parts of the process.
1812
keywords: NuGet package consumption, NuGet consumption overview, NuGet consumption workflow, package consumption workflow, package consumption overview
19-
#ROBOTS:
20-
#audience:
21-
#ms.devlang:
2213
ms.reviewer:
2314
- karann-msft
2415
- unniravindranathan
25-
#ms.suite:
26-
#ms.tgt_pltfrm:
27-
#ms.custom:
28-
2916
---
3017

3118
# Package consumption workflow

docs/Consume-Packages/Package-restore-troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# required metadata
33

4-
title: Troubleshooting NuGet Package Restore in Visual STudio | Microsoft Docs
4+
title: Troubleshooting NuGet Package Restore in Visual Studio | Microsoft Docs
55
author: kraigb
66
ms.author: kraigb
77
manager: ghogen

docs/Create-Packages/Creating-a-Package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The following is a typical (but fictitious) `.nuspec` file, with comments descri
145145
</package>
146146
```
147147

148-
For details on declaring dependencies and specifying version numbers, see [Package versioning](../reference/package-versioning.md).
148+
For details on declaring dependencies and specifying version numbers, see [Package versioning](../reference/package-versioning.md). It is also possible to surface assets from dependencies directly in the package by using the `include` and `exclude` attributes on the `dependency` element. See [.nuspec Reference - Dependencies](../Schema/nuspec.md#dependencies).
149149

150150
Because the manifest is included in the package created from it, you can find any number of additional examples by examining existing packages. A good source is the global package cache on your machine, the location of which is returned by the following command:
151151

docs/Create-Packages/Overview-and-Workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Overview and workflow of creating NuGet packages | Microsoft Docs
55
author: kraigb
66
ms.author: kraigb
77
manager: ghogen
8-
ms.date: 7/26/2017
8+
ms.date: 07/26/2017
99
ms.topic: article
1010
ms.prod: nuget
1111
ms.technology: null

docs/Create-Packages/Publish-a-package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Next, you can either upload the package through the nuget.org web portal, push t
6969
4. Push your package to NuGet Gallery using the command:
7070
7171
```
72-
nuget push YourPackage.nupkg -Source https://www.nuget.org/api/v2/package
72+
nuget push YourPackage.nupkg -Source https://api.nuget.org/v3/index.json
7373
```
7474
7575
5. Before being made public, all packages uploaded to nuget.org are scanned for viruses and rejected if any viruses are found. All packages listed on nuget.org are also scanned periodically.

docs/Guides/Install-NuGet.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
# required metadata
33

44
title: Installing NuGet client tools | Microsoft Docs
5-
author: kraigb
6-
ms.author: kraigb
7-
manager: ghogen
8-
ms.date: 10/2/2017
5+
author: kraigb
6+
ms.author: kraigb
7+
manager: ghogen
8+
ms.date: 10/02/2017
99
ms.topic: get-started-article
10-
ms.prod: nuget
11-
ms.technology: null
12-
ms.assetid: 683b8b34-a6f4-4d56-b9cd-2483bfbad1ad
13-
10+
ms.prod: nuget
11+
ms.technology: null
12+
ms.assetid: 683b8b34-a6f4-4d56-b9cd-2483bfbad1ad
13+
1414
# optional metadata
1515

1616
description: Guidance on installing client tools, the command-line interface (CLI), and the Package Manager for Visual Studio.
1717
keywords: nuget.exe CLI, NuGet client tools, NuGet package manager, NuGet package manager console, NuGet for Visual Studio, NuGet beta channel
18-
ms.reviewer:
19-
- karann-msft
20-
- unniravindranathan
21-
18+
ms.reviewer:
19+
- karann-msft
20+
- unniravindranathan
21+
2222
---
2323

2424
# Installing NuGet client tools
2525

26-
> [!Tip]
26+
> [!Tip]
2727
> **Looking to install a package? See [Quickstart - Use a package](../Quickstart/Use-a-Package.md).**
2828
2929
There are two primary tools available to help you build, publish and consume NuGet packages:
@@ -33,6 +33,8 @@ There are two primary tools available to help you build, publish and consume NuG
3333

3434
With Visual Studio for Mac, NuGet capabilities are built in directly. See [Including a NuGet package in your project](https://docs.microsoft.com/visualstudio/mac/nuget-walkthrough) for a walkthrough.
3535

36+
Visual Studio Code at present does not have any built-in NuGet support. Use the NuGet CLI or the [dotnet CLI](../Tools/dotnet-Commands.md).
37+
3638
The NuGet CLI and Package Manager both support the following operations:
3739

3840
- Search packages
@@ -55,7 +57,6 @@ The following capabilities are supported only in the NuGet CLI:
5557
> Another good tool is the [NuGet Package Explorer](https://github.com/NuGetPackageExplorer/NuGetPackageExplorer), an open-source, stand-alone tool to visually explore, create, and edit NuGet packages. It's very helpful, for example, to make experimental changes to a package structure without having to rebuild the package each time.
5658
> The cross-platform [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/tools/index#installation) toolchain, used for developing .NET Core applications, supports several NuGet commands, such as delete, locals, push, pack, and restore.
5759
58-
5960
## NuGet CLI
6061

6162
The NuGet command-line interface provides access to all NuGet capabilities, and can be run on Windows, Mac OSX, and Linux as described in the following sections.
@@ -73,15 +74,15 @@ The NuGet command-line interface provides access to all NuGet capabilities, and
7374

7475
- **Chocolatey**: Install the [NuGet.CommandLine](http://chocolatey.org/packages/NuGet.CommandLine) Chocolatey package using the [Chocolatey](http://chocolatey.org) client.
7576

76-
```
77+
```ps
7778
choco install nuget.commandline
7879
```
79-
80+
8081
- **Visual Studio**: Install the [NuGet.CommandLine](http://www.nuget.org/packages/NuGet.CommandLine/) package from the Package Manager Console in Visual Studio.
8182
8283
> [!Note]
8384
> **For NuGet 2.x users**: Because of breaking changes introduced in NuGet 3.2, [https://nuget.org/nuget.exe](https://nuget.org/nuget.exe) points to the latest stable NuGet 2.x release to prevent continuous integration systems from potentially breaking.
84-
85+
8586
<a name="compatibility-with-mono"></a>
8687
8788
## Mac OSX and Linux
@@ -110,14 +111,12 @@ On Mac OSX and Linux, there are two ways to run the NuGet CLI:
110111
- Commands that do not work:
111112
- update
112113
113-
114114
### Related topics
115115
116116
- [NuGet CLI reference](../tools/nuget-exe-cli-reference.md)
117117
- [Creating a package](../create-packages/creating-a-package.md)
118118
- [Publishing a Package](../create-packages/publish-a-package.md)
119119
120-
121120
## NuGet Package Manager in Visual Studio
122121
123122
The NuGet Package Manager is included in every edition of Visual Studio on Windows, 2012 and later. It includes the Package Manager UI ([reference](../tools/package-manager-ui.md)), and the Package Manager Console through which you can access tools that come with certain packages ([reference](../tools/package-manager-console.md)).
@@ -127,8 +126,7 @@ The Visual Studio 2017 installer includes the NuGet Package Manager with any wor
127126
> [!Note]
128127
> The console requires [PowerShell 2.0](http://support.microsoft.com/kb/968929), which will already be installed on Windows 7 or higher and Windows Server 2008 R2 or higher.
129128
>
130-
> Package Manager Console commands also work only within Visual Studio on Windows. Use the NuGet CLI outside of that environment, including with Visual Studio for Mac.
131-
129+
> Package Manager Console commands also work only within Visual Studio on Windows. Use the NuGet CLI outside of that environment, including with Visual Studio for Mac and Visual Studio Code.
132130
133131
### Package Manager installation for Visual Studio 2010 and earlier
134132

docs/Hosting-Packages/Overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Overview of Hosting Your Own NuGet Feeds | Microsoft Docs
55
author: kraigb
66
ms.author: kraigb
77
manager: ghogen
8-
ms.date: 8/25/2017
8+
ms.date: 08/25/2017
99
ms.topic: article
1010
ms.prod: nuget
1111
#ms.service:

docs/Policies/NuGet-FAQ.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ You need to select the **All** source when installing a local package into the p
155155

156156
In most projects where separate projects live in separate folders, this is not a problem as NuGet identifies the `packages.config` and `project.json` files in each project. With NuGet 3.3+ and multiple projects in the same folder, you can insert the name of the project into the `packages.config` or `project.json` filenames as below and NuGet uses that file:
157157

158-
`packages.config`: use the pattern `packages.{project-name}.config`
159-
`project.json`: use the pattern `{project-name}.project.json`
158+
- `packages.config`: use the pattern `packages.{project-name}.config`
159+
- `project.json`: use the pattern `{project-name}.project.json`
160160

161161
This is not an issue when using PackageReference, as each project file contains its own list of dependencies.
162162

@@ -244,3 +244,8 @@ First, make sure you're using the latest versions of NuGet. If that version cont
244244
Note: it may be required to set the `HTTP_PROXY` environment variable to `http://127.0.0.1:8888` for routing NuGet traffic through Fiddler.
245245

246246
If that fails, try the [tips mentioned in this StackOverflow post](http://stackoverflow.com/questions/21049908/using-fiddler-to-sniff-visual-studio-2013-requests-proxy-firewall).
247+
248+
**What are the API endpoints for nuget.org?**
249+
250+
V3: `https://api.nuget.org/v3/index.json`
251+
V2: `https://www.nuget.org/api/v2/` (Note that the V2 API is deprecated and does not work with NuGet 4+.)

docs/Quickstart/Create-and-Publish-a-Package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Once you have a `.nupkg` file, you publish it to nuget.org using the `push` comm
134134
1. At a command prompt, run the following command, specifying your package name and replacing the key with the value copied in step 4:
135135
136136
```
137-
nuget push AppLogger.1.0.0.0.nupkg 47be3377-c434-4c29-8576-af7f6993a54b -Source https://www.nuget.org/api/v2/package
137+
nuget push AppLogger.1.0.0.0.nupkg 47be3377-c434-4c29-8576-af7f6993a54b -Source https://api.nuget.org/v3/index.json
138138
```
139139
140140
1. nuget.exe displays the results of the publishing process:

docs/Quickstart/Use-a-Package.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,23 @@
11
---
2-
# required metadata
3-
42
title: Introductory Guide to Using NuGet Packages | Microsoft Docs
53
author: kraigb
64
ms.author: kraigb
75
manager: ghogen
8-
ms.date: 10/4/2017
6+
ms.date: 10/04/2017
97
ms.topic: get-started-article
108
ms.prod: nuget
119
ms.technology: null
1210
ms.assetid: f31f8259-20a8-4617-880e-5819299372d2
13-
14-
# optional metadata
15-
1611
description: A walkthrough tutorial on the process of installing and using a NuGet package in a project.
1712
keywords: install NuGet, NuGet package consumption, installing NuGet packages, NuGet package references, using NuGet packages
1813
ms.reviewer:
1914
- karann-msft
2015
- unniravindranathan
21-
2216
---
2317

2418
# Install and use a package
2519

26-
Installing a package happens in three ways:
27-
28-
| Method | Description | Reference |
29-
| --- | --- | --- |
30-
| nuget.exe CLI: `nuget install <package_name>` | Downloads the package identified by \<package_name\> and expands its contents into a folder in the current directory. No changes are made to any project files. Dependencies are also downloaded and expanded. | [CLI reference](../tools/nuget-exe-CLI-Reference.md) |
31-
| Package Manager Console (Visual Studio): `Install-Package <package_name>` | Downloads and installs the package into the current project, then update the project file to list the package as a dependency. | [Package Manager Console Guide](../tools/Package-Manager-Console.md) |
32-
| Package Manager UI (Visual Studio) | Provides a UI through which you can browse, select, and install packages into a project. Updates the project file to list the package as a dependency. | [Package Manager UI Reference](../tools/Package-Manager-UI.md) |
20+
[!INCLUDE [install-methods](../includes/install-methods.md)]
3321

3422
Once installed, refer to the package in code with `using <namespace>` where \<namespace\> is specific to the package you're using. Once the reference is made, you can call the package through its API.
3523

0 commit comments

Comments
 (0)