Skip to content

Commit 49fd44f

Browse files
committed
resolve merge conflicts
2 parents b7c3ff8 + 53ae0ff commit 49fd44f

File tree

90 files changed

+1080
-628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1080
-628
lines changed

.openpublishing.redirection.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,46 @@
114114
"source_path": "docs/policies/nuget-faq.md",
115115
"redirect_url": "/nuget/faqs/nuget-faq",
116116
"redirect_document_id": false
117+
},
118+
{
119+
"source_path": "docs/reference/ID-Prefix-Reservation.md",
120+
"redirect_url": "/nuget-org/id-prefix-reservation",
121+
"redirect_document_id": false
122+
},
123+
{
124+
"source_path": "docs/reference/licenses-nuget-org.md",
125+
"redirect_url": "/nuget-org/licenses-nuget-org",
126+
"redirect_document_id": false
127+
},
128+
{
129+
"source_path": "docs/reference/organizations-on-nuget-org.md",
130+
"redirect_url": "/nuget-org/organizations-on-nuget-org",
131+
"redirect_document_id": false
132+
},
133+
{
134+
"source_path": "docs/policies/data-requests.md",
135+
"redirect_url": "/nuget-org/policies/data-requests",
136+
"redirect_document_id": false
137+
},
138+
{
139+
"source_path": "docs/policies/deleting-packages.md",
140+
"redirect_url": "/nuget-org/policies/deleting-packages",
141+
"redirect_document_id": false
142+
},
143+
{
144+
"source_path": "docs/policies/dispute-resolution.md",
145+
"redirect_url": "/nuget-org/policies/dispute-resolution",
146+
"redirect_document_id": false
147+
},
148+
{
149+
"source_path": "docs/consume-packages/ways-to-install-a-package.md",
150+
"redirect_url": "/consume-packages/overview-and-workflow",
151+
"redirect_document_id": false
152+
},
153+
{
154+
"source_path": "docs/consume-packages/publish-a-package.md",
155+
"redirect_url": "/nuget-org/publish-a-package",
156+
"redirect_document_id": false
117157
}
118158
]
119159
}

docs/TOC.md

Lines changed: 158 additions & 148 deletions
Large diffs are not rendered by default.

docs/_breadcrumb/toc.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,9 @@
1818
- name: Consume packages
1919
tocHref: /nuget/consume-packages/
2020
topicHref: /nuget/consume-packages/overview-and-workflow
21-
- name: Hosting packages
22-
tocHref: /nuget/hosting-packages/
23-
topicHref: /nuget/hosting-packages/overview
24-
- name: Tools
25-
tocHref: /nuget/tools/
26-
topicHref: /nuget/tools/nuget-exe-cli-reference
2721
- name: Reference
2822
tocHref: /nuget/reference/
2923
topicHref: /nuget/reference/nuspec
30-
- name: API
31-
tocHref: /nuget/api/
32-
topicHref: /nuget/api/overview
3324
- name: Visual Studio extensibility
3425
tocHref: /nuget/visual-studio-extensibility/
3526
topicHref: /nuget/visual-studio-extensibility/nuget-api-in-visual-studio
@@ -38,4 +29,7 @@
3829
topicHref: /nuget/policies/governance
3930
- name: Release notes
4031
tocHref: /nuget/release-notes/
41-
topicHref: /nuget/release-notes/index
32+
topicHref: /nuget/release-notes/index
33+
- name: NuGet.org
34+
tocHref: /nuget/nuget-org/
35+
topicHref: /nuget/nuget-org/organizations-on-nuget-org

docs/api/catalog-resource.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ Catalog items with the type `PackageDelete` contain a minimal set of information
262262
package has been deleted from the package source and is no longer available for any package operation (such as
263263
restore).
264264

265-
> [!Note]
265+
> [!NOTE]
266266
> It is possible for a package to be deleted and later republished using the same package ID and version. On nuget.org,
267267
> this is a very rare case as it breaks the official client's assumption that a package ID and version imply a specific
268268
> package content. For more information about package deletion on nuget.org, see
269-
> [our policy](../policies/deleting-packages.md).
269+
> [our policy](../nuget-org/policies/deleting-packages.md).
270270
271271
Package delete catalog items have no additional properties in addition to those
272272
[included on all catalog leaves](#catalog-leaf).

docs/api/package-publish-resource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Server implementations vary on the success status code returned when a package i
7979
nuget.org interprets the package delete request as an "unlist". This means that the package is still available for
8080
existing consumers of the package but the package no longer appears in search results or in the web interface. For
8181
more information about this practice, see the
82-
[Deleted Packages](../policies/deleting-packages.md) policy. Other server
82+
[Deleted Packages](../nuget-org/policies/deleting-packages.md) policy. Other server
8383
implementations are free to interpret this signal as a hard delete, soft delete, or unlist. For example,
8484
[NuGet.Server](https://www.nuget.org/packages/NuGet.Server) (a server implementation only supporting the older V2 API)
8585
supports handling this request as either an unlist or a hard delete based on a configuration option.

docs/api/search-query-service-resource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ summary | string | no |
104104
tags | string or array of strings | no |
105105
title | string | no |
106106
totalDownloads | integer | no | This value can be inferred by the sum of downloads in the `versions` array
107-
verified | boolean | no | A JSON boolean indicating whether the package is [verified](../reference/id-prefix-reservation.md)
107+
verified | boolean | no | A JSON boolean indicating whether the package is [verified](../nuget-org/id-prefix-reservation.md)
108108

109109
On nuget.org, a verified package is one which has a package ID matching a reserved ID prefix and owned by one of the
110110
reserved prefix's owners. For more information, see the
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: What happens when a package is installed?
3+
description: Detailed information about the package installation process
4+
author: karann-msft
5+
ms.author: karann
6+
ms.date: 0/20/2019
7+
ms.topic: conceptual
8+
---
9+
10+
# What happens when a NuGet package is installed?
11+
12+
Simply said, the different NuGet tools typically create a reference to a package in the project file or `packages.config`, then perform a package restore, which effectively installs the package. The exception is `nuget install`, which only expands the package into a `packages` folder and does not modify any other files.
13+
14+
The general process is as follows:
15+
16+
1. (All tools except `nuget.exe`) Record the package identifier and version into the project file or `packages.config`.
17+
18+
If the installation tool is Visual Studio or the dotnet CLI, the tool first attempts to install the package. If it's incompatible, the package is not added to the project file or `packages.config`.
19+
20+
2. Acquire the package:
21+
- Check if the package (by exact identifer and version number) is already installed in the *global-packages* folder as described on [Managing the global packages and cache folders](../consume-packages/managing-the-global-packages-and-cache-folders.md).
22+
23+
- If the package is not in the *global-packages* folder, attempt to retrieve it from the sources listed listed in the [configuration files](../consume-packages/Configuring-NuGet-Behavior.md). For online sources, attempt first to retrieve the package from the HTTP cache unless `-NoCache` is specified with `nuget.exe` commands or `--no-cache` is specified with `dotnet restore`. (Visual Studio and `dotnet add package` always use the cache.) If a package is used from the cache, "CACHE" appears in the output. The cache has an expiration time of 30 minutes.
24+
25+
- If the package is not in the HTTP cache, attempt to download it from the sources listed in the configuration. If a package is downloaded, "GET" and "OK" appear in the output. NuGet logs http traffic on normal verbosity.
26+
27+
- If the package cannot be successfully acquired from any sources, installation fails at this point with an error such as [NU1103](../reference/errors-and-warnings/NU1103.md). Note that errors from `nuget.exe` commands show only the last source checked, but implies that the package wasn't available from any source.
28+
29+
When acquiring the package, the order of sources in the NuGet configuration may apply:
30+
31+
- NuGet checks sources local folder and network shares before checking HTTP sources.
32+
33+
3. Save a copy of the package and other information in the *http-cache* folder as described on [Managing the global packages and cache folders](../consume-packages/managing-the-global-packages-and-cache-folders.md).
34+
35+
4. If downloaded, install the package into the per-user *global-packages* folder. NuGet creates a subfolder for each package identifier, then creates subfolders for each installed version of the package.
36+
37+
5. NuGet installs package dependencies as required. This process might update package versions in the process, as described in [Dependency Resolution](../consume-packages/dependency-resolution.md).
38+
39+
6. Update other project files and folders:
40+
41+
- For projects using PackageReference, update the package dependency graph stored in `obj/project.assets.json`. Package contents themselves are not copied into any project folder.
42+
- Update `app.config` and/or `web.config` if the package uses [source and config file transformations](../create-packages/source-and-config-file-transformations.md).
43+
44+
7. (Visual Studio only) Display the package's readme file, if available, in a Visual Studio window.
45+
46+
Enjoy your productive coding with NuGet packages!

docs/consume-packages/Finding-and-Choosing-Packages.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ At the same time, using a NuGet package means taking a dependency on it, so you
9191

9292
- *Interview the owners*: new developers can certainly be equally committed to producing great packages for you to use, and it's good to give them a chance to bring something new to the NuGet ecosystem. With this in mind, reach out directly to the package developers through the **Contact Owners** option under **Info** on the listing page. Chances are, they'll be happy to work with you to serve your needs!
9393

94-
- *Reserved Package ID Prefixes*: many package owners have applied for and have been granted a [reserved package ID prefix](../reference/id-prefix-reservation.md). When you see the visual checkmark next to a package ID on [nuget.org](https://www.nuget.org/), or in Visual Studio, that means that the package owner has met our [criteria](../reference/id-prefix-reservation.md#id-prefix-reservation-criteria) for ID prefix reservation. This means the package owner is being clear on identifying themselves and their package.
94+
- *Reserved Package ID Prefixes*: many package owners have applied for and have been granted a [reserved package ID prefix](../nuget-org/id-prefix-reservation.md). When you see the visual checkmark next to a package ID on [nuget.org](https://www.nuget.org/), or in Visual Studio, that means that the package owner has met our [criteria](../nuget-org/id-prefix-reservation.md#id-prefix-reservation-criteria) for ID prefix reservation. This means the package owner is being clear on identifying themselves and their package.
9595

9696
> [!Note]
9797
> Always be mindful of a package's license terms, which you can see by selecting **License Info** on a package's listing page on nuget.org. If a package does not specify license terms, contact the package owner directly using the **Contact owners** link on the package page. Microsoft does not license any intellectual property to you from third party package providers and is not responsible for information provided by third parties.
9898
9999
## License URL deprecation
100-
As we transition from [licenseUrl](../reference/nuspec#licenseurl) to [license](../reference/nuspec#license), some NuGet clients and NuGet feeds may not yet have the ability to surface licensing information in some cases. To maintain backward compatibility, the license URL points to this document which talks about how to retrieve the license information in such cases.
100+
As we transition from [licenseUrl](../reference/nuspec.md#licenseurl) to [license](../reference/nuspec.md#license), some NuGet clients and NuGet feeds may not yet have the ability to surface licensing information in some cases. To maintain backward compatibility, the license URL points to this document which talks about how to retrieve the license information in such cases.
101101

102102
If clicking on the license URL for a package brought you to this page, it implies the package contains a license file and
103103
* You are connected to a feed that does not yet know how to interpret and surface the new license information to the client

docs/consume-packages/Overview-and-Workflow.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Between nuget.org and private package galleries that your organization might est
1515

1616
\* _Visual Studio and `dotnet.exe` only. The `nuget install` command does not modify project files or the `packages.config` file; entries must be managed manually._
1717

18-
For further details, see [Finding and Choosing Packages](../consume-packages/finding-and-choosing-packages.md) and [Different ways to install a NuGet package](ways-to-install-a-package.md).
18+
For further details, see [Finding and Choosing Packages](../consume-packages/finding-and-choosing-packages.md) and [What happens when a package is installed?](../concepts/package-installation-process.md).
1919

20-
NuGet remembers the identity and version number of each installed package, recording it in either the project file (using [PackageReference](../consume-packages/package-references-in-project-files.md)) or [`packages.config`](../reference/packages-config.md), depending on project type and your version of NuGet. With NuGet 4.0+, PackageReference is preferred, although this is configurable in Visual Studio through the [Package Manager UI options](../tools/package-manager-ui.md). In any case, you can look in the appropriate file at any time to see the full list of dependencies for your project.
20+
NuGet remembers the identity and version number of each installed package, recording it in either the project file (using [PackageReference](../consume-packages/package-references-in-project-files.md)) or [`packages.config`](../reference/packages-config.md), depending on project type and your version of NuGet. With NuGet 4.0+, PackageReference is preferred, although this is configurable in Visual Studio through the [Package Manager UI](../tools/package-manager-ui.md). In any case, you can look in the appropriate file at any time to see the full list of dependencies for your project.
2121

2222
> [!Tip]
2323
> It's prudent to always check the license for each package you intend to use in your software. On nuget.org, you find a **License Info** link on the right side of each package's description page. If a package does not specify license terms, contact the package owner directly using the **Contact owners** link on the package page. Microsoft does not license any intellectual property to you from third party package providers and is not responsible for information provided by third parties.
@@ -36,4 +36,13 @@ Occasionally it's necessary to reinstall packages that are already included in a
3636

3737
Finally, NuGet's behavior is driven by `Nuget.Config` files. Multiple files can be used to centralize certain settings at different levels, as explained in [Configuring NuGet Behavior](../consume-packages/configuring-nuget-behavior.md).
3838

39-
Enjoy your productive coding with NuGet packages!
39+
## Ways to install a NuGet Package
40+
41+
NuGet packages are downloaded and installed using any of the methods in the following table.
42+
43+
| Tool | Description |
44+
| --- | --- |
45+
| [dotnet.exe CLI](install-use-packages-dotnet-cli.md) | (All platforms) CLI tool for .NET Core and .NET Standard libraries, and for SDK-style projects that target .NET Framework (see [SDK attribute](/dotnet/core/tools/csproj#additions)). Retrieves the package identified by \<package_name\> and adds a reference to the project file. Also retrieves and installs dependencies. |
46+
| Visual Studio | (Windows and Mac) Provides a UI through which you can browse, select, and install packages and their dependencies into a project from a specified package source. Adds references to installed packages to the project file.<ul><li>[Install and manage packages using Visual Studio](../tools/package-manager-ui.md)</li><li>[Including a NuGet package in your project (Mac)](/visualstudio/mac/nuget-walkthrough)</li></ul> |
47+
| [PowerShell in Visual Studio](../tools/package-manager-console.md) | (Windows only) Retrieves and installs the package identified by \<package_name\> from a selected source into a specified project in the solution, then adds a reference to the project file. Also retrieves and installs dependencies. |
48+
| [nuget.exe CLI](install-use-packages-dotnet-cli.md) | (All platforms) CLI tool for .NET Framework libraries and non-SDK-style projects that target .NET Standard libraries. Retrieves the package identified by \<package_name\> and expands its contents into a folder in the current directory; can also retrieve all packages listed in a `packages.config` file. Also retrieves and installs dependencies, but makes no changes to project files or `packages.config`. |

docs/consume-packages/Package-References-in-Project-Files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.topic: conceptual
99

1010
# Package references (PackageReference) in project files
1111

12-
Package references, using the `PackageReference` node, manage NuGet dependencies directly within project files (as opposed to a separate `packages.config` file). Using PackageReference, as it's called, doesn't affect other aspects of NuGet; for example, settings in `NuGet.config` files (including package sources) are still applied as explained in [Configuring NuGet Behavior](configuring-nuget-behavior.md).
12+
Package references, using the `PackageReference` node, manage NuGet dependencies directly within project files (as opposed to a separate `packages.config` file). Using PackageReference, as it's called, doesn't affect other aspects of NuGet; for example, settings in `NuGet.config` files (including package sources) are still applied as explained in [Common NuGet configurations](configuring-nuget-behavior.md).
1313

1414
With PackageReference, you can also use MSBuild conditions to choose package references per target framework, configuration, platform, or other groupings. It also allows for fine-grained control over dependencies and content flow. (See For more details [NuGet pack and restore as MSBuild targets](../reference/msbuild-targets.md).)
1515

0 commit comments

Comments
 (0)