You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ The NuGet documentation contained in this repository is hosted on docs.microsoft
4
4
5
5
Contributions to this docset are welcome. Please submit PRs to the *live* branch, which is what's published to the live docs site. (The master branch is used for staging larger series of changes.)
6
6
7
+
NuGet follows the [.NET Foundation Contributors Code of Conduct](https://github.com/dotnet/home/blob/master/guidance/be-nice.md). Please take a few minutes to review it.
8
+
7
9
## Respository structure
8
10
9
11
- All markdown files are in the docs folder and various subfolders.
Copy file name to clipboardExpand all lines: docs/Guides/Install-NuGet.md
+34-22Lines changed: 34 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ title: Installing NuGet | Microsoft Docs
5
5
author: kraigb
6
6
ms.author: kraigb
7
7
manager: ghogen
8
-
ms.date: 1/9/2017
8
+
ms.date: 4/4/2017
9
9
ms.topic: article
10
10
ms.prod: nuget
11
11
#ms.service:
@@ -32,7 +32,7 @@ ms.reviewer:
32
32
33
33
There are two primary tools available to help you build, publish and consume NuGet packages:
34
34
35
-
1. The [**NuGet CLI**](#nuget-cli) is the command-line utility that works on Windows, Mac OS X, and Linux and supports all NuGet capabilities.
35
+
1. The [**NuGet CLI**](#nuget-cli) is the command-line utility for Windows that provides all NuGet capabilities; it can also be run on Mac OSX and Linux through either the .NET Core CLI or with Mono.
36
36
1. The [**NuGet Package Manager in Visual Studio**](#nuget-package-manager-in-visual-studio) is a GUI tool for managing packages and includes a console through which you can use certain NuGet commands directly within Visual Studio. It's included with Visual Studio 2012 and later and can be installed manually for earlier versions.
37
37
38
38
Both support the following operations:
@@ -60,7 +60,11 @@ The following capabilities are supported only in the NuGet CLI:
60
60
61
61
## NuGet CLI
62
62
63
-
The NuGet CLI can be installed using any of the following methods:
63
+
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.
64
+
65
+
### Windows
66
+
67
+
On Windows, the NuGet CLI can be installed using any of the following methods:
64
68
65
69
1.**nuget.org**: Download the latest version of the nuget.exe file from [nuget.org/downloads](https://nuget.org/downloads) and save it to an appropriate location on your machine. If desired, add that location to your PATH environment variable so you can NuGet from anywhere. (Note that the download is a single .exe file, so save it rather than running it from the browser.)
66
70
@@ -80,25 +84,33 @@ The NuGet CLI can be installed using any of the following methods:
80
84
>
81
85
> Because there are a few 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 CI systems from potentially breaking at this time.
82
86
83
-
### Compatibility with Mono
84
-
85
-
Though not fully-supported as yet, the NuGet command-line executable (version 3.2 and above) will run on Mac OS X and Linux systems when the Mono runtime is installed with a few limitations:
86
-
87
-
- Commands tested to work:
88
-
- Config
89
-
- Delete
90
-
- Help
91
-
- Install
92
-
- List
93
-
- Push
94
-
- SetApiKey
95
-
- Sources
96
-
- Spec
97
-
- Partially-working commands:
98
-
- Pack: works with `.nuspec` files but not with project files.
99
-
- Restore: works with `packages.config` and `project.json` files but not with solution (`.sln`) files.
100
-
- Commands that do not work:
101
-
- Update
87
+
<a name="compatibility-with-mono"></a>
88
+
89
+
## Mac OSX and Linux
90
+
91
+
On Mac OSX and Linux, there are two ways to run NuGet:
92
+
93
+
1. Install the [.NET Core SDK](https://www.microsoft.com/net/download/core), which includes NuGet capabilities. Downloads are also listed on [github.com/dotnet/cli](https://github.com/dotnet/cli).
94
+
95
+
1. Install [Mono](http://www.mono-project.com/docs/getting-started/install/) and then use the nuget.exe command-line executable for Windows (version 3.2 and later) from [nuget.org/downloads](https://nuget.org/downloads). Running NuGet on Mono is subject to the following limitations:
96
+
97
+
- Commands tested to work:
98
+
- Config
99
+
- Delete
100
+
- Help
101
+
- Install
102
+
- List
103
+
- Push
104
+
- SetApiKey
105
+
- Sources
106
+
- Spec
107
+
108
+
- Partially-working commands:
109
+
- Pack: works with `.nuspec` files but not with project files.
110
+
- Restore: works with `packages.config` and `project.json` files but not with solution (`.sln`) files.
Copy file name to clipboardExpand all lines: docs/Schema/Target-Frameworks.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ NuGet uses target framework references in a variety of places to specifically id
34
34
35
35
-[.nuspec manifest](../schema/nuspec.md): A package can indicate distinct packages to be included in a project depending on the project's target framework.
36
36
-[.nupkg folder name](../create-packages/creating-a-package.md#from-a-convention-based-working-directory): The folders inside a package's `lib` folder can be named according to the target framework, each of which contains the DLLs and other content appropriate to that framework.
37
+
-[packages.config](../Schema/packages-config.md): The `targetframework` attribute of a dependency specifies the variant of a package to install.
37
38
-[project.json](../Schema/project-json.md): The `frameworks` node specifies the framework versions that the project can be compiled against.
Copy file name to clipboardExpand all lines: docs/Schema/msbuild-targets.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ title: NuGet pack and restore as MSBuild targets | Microsoft Docs
5
5
author: kraigb
6
6
ms.author: kraigb
7
7
manager: ghogen
8
-
ms.date: 2/8/2017
8
+
ms.date: 4/3/2017
9
9
ms.topic: article
10
10
ms.prod: nuget
11
11
#ms.service:
@@ -33,7 +33,7 @@ ms.reviewer:
33
33
34
34
NuGet 4.0+ can work directly with the information in a `.csproj` file without requiring a separate `.nuspec` or `project.json` file. All the metadata that was previously stored in those configuration files can be instead stored in the `.csproj` file directly, as described here.
35
35
36
-
With MSBuild 15.1+, NuGet is also a first-class MSBuild citizen with the `pack` and `restore` targets as described below. These targets allow you to work with NuGet as you would with any other MSBuild task or target.
36
+
With MSBuild 15.1+, NuGet is also a first-class MSBuild citizen with the `pack` and `restore` targets as described below. These targets allow you to work with NuGet as you would with any other MSBuild task or target. (For NuGet 3.x and earlier, you use the [pack](../tools/nuget-exe-cli-reference.md#pack) and [restore](../tools/nuget-exe-cli-reference.md#pack) commands through the NuGet CLI instead.)
Copy file name to clipboardExpand all lines: docs/Schema/nuget-config-file.md
+59-59Lines changed: 59 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -63,13 +63,13 @@ Contains miscellaneous configuration settings, which can be set using the [`nuge
63
63
64
64
Note: `dependencyVersion` and `repositoryPath` apply only to projects using `packages.config`. `globalPackagesFolder` applies only to projects using `project.json` and projects using the new Visual Studio 2017 project format.
65
65
66
-
Key | Value
67
-
--- | ---
68
-
dependencyVersion (package.config only) | The default `DependencyVersion` value for package install, restore, and update, when the `-DependencyVersion` switch is not specified directly. This value is also used by the NuGet Package Manager UI. Values are `Lowest`, `HighestPatch`, `HighestMinor`, `Highest`.
69
-
globalPackagesFolder (projects not using `packages.config`) | The location of the default global packages folder. The default is `%userprofile%\.nuget\packages`. A relative path can be used in project-specific `Nuget.Config` files.
70
-
repositoryPath (`packages.config` only) | The location in which to install NuGet packages instead of the default `$(Solutiondir)\packages` folder. A relative path can be used in project-specific `Nuget.Config` files.
71
-
defaultPushSource | Identifies the URL or path of the package source that should be used as the default if no other package sources are found for an operation.
72
-
http_proxy http_proxy.user http_proxy.password no_proxy | Proxy settings to use when connecting to package sources; `http_proxy` should be in the format `http://<username>:<password>@<domain>`. Passwords are encrypted and cannot be added manually. For `no_proxy`, the value is a comma-separated list of domains the bypass the proxy server. You can alternately use the http_proxy and no_proxy environment variables for those values. For additional details, see [NuGet proxy settings](http://skolima.blogspot.com/2012/07/nuget-proxy-settings.html) (skolima.blogspot.com).
66
+
|Key | Value|
67
+
|--- | ---|
68
+
|dependencyVersion (package.config only) | The default `DependencyVersion` value for package install, restore, and update, when the `-DependencyVersion` switch is not specified directly. This value is also used by the NuGet Package Manager UI. Values are `Lowest`, `HighestPatch`, `HighestMinor`, `Highest`.|
69
+
|globalPackagesFolder (projects not using `packages.config`) | The location of the default global packages folder. The default is `%userprofile%\.nuget\packages`. A relative path can be used in project-specific `Nuget.Config` files.|
70
+
|repositoryPath (`packages.config` only) | The location in which to install NuGet packages instead of the default `$(Solutiondir)\packages` folder. A relative path can be used in project-specific `Nuget.Config` files.|
71
+
|defaultPushSource | Identifies the URL or path of the package source that should be used as the default if no other package sources are found for an operation.|
72
+
|http_proxy http_proxy.user http_proxy.password no_proxy | Proxy settings to use when connecting to package sources; `http_proxy` should be in the format `http://<username>:<password>@<domain>`. Passwords are encrypted and cannot be added manually. For `no_proxy`, the value is a comma-separated list of domains the bypass the proxy server. You can alternately use the http_proxy and no_proxy environment variables for those values. For additional details, see [NuGet proxy settings](http://skolima.blogspot.com/2012/07/nuget-proxy-settings.html) (skolima.blogspot.com).|
73
73
74
74
75
75
**Example**:
@@ -88,9 +88,9 @@ http_proxy http_proxy.user http_proxy.password no_proxy | Proxy settings to use
88
88
89
89
Configures whether NuGet does automatic binding redirects when a package is installed.
90
90
91
-
Key | Value
92
-
--- | ---
93
-
skip | A Boolean indicating whether to skip automatic binding redirects. The default is false.
91
+
|Key | Value|
92
+
|--- | ---|
93
+
|skip | A Boolean indicating whether to skip automatic binding redirects. The default is false.|
94
94
95
95
**Example**:
96
96
@@ -106,10 +106,10 @@ skip | A Boolean indicating whether to skip automatic binding redirects. The def
106
106
107
107
Controls package restore during builds.
108
108
109
-
Key | Value
110
-
--- | ---
111
-
enabled | A Boolean indicating whether NuGet can perform automatic restore. You can also set the `EnableNuGetPackageRestore` environment variable with a value of `True` instead of setting this key in the config file.
112
-
automatic | A Boolean indicating whether NuGet should check for missing packages during a build.
109
+
|Key | Value|
110
+
|--- | ---|
111
+
|enabled | A Boolean indicating whether NuGet can perform automatic restore. You can also set the `EnableNuGetPackageRestore` environment variable with a value of `True` instead of setting this key in the config file.|
112
+
|automatic | A Boolean indicating whether NuGet should check for missing packages during a build.|
113
113
114
114
**Example**:
115
115
@@ -124,9 +124,9 @@ automatic | A Boolean indicating whether NuGet should check for missing packages
124
124
125
125
Controls whether the `packages` folder of a solution is included in source control. This section works only in `Nuget.Config` files in a solution folder.
126
126
127
-
Key | Value
128
-
--- | ---
129
-
disableSourceControlIntegration | A Boolean indicating whether to ignore the packages folder when working with source control. The default value is false.
127
+
|Key | Value|
128
+
|--- | ---|
129
+
|disableSourceControlIntegration | A Boolean indicating whether to ignore the packages folder when working with source control. The default value is false.|
130
130
131
131
132
132
**Example**:
@@ -148,9 +148,9 @@ The [`nuget sources` command](../tools/nuget-exe-cli-reference.md#sources) is ge
148
148
149
149
Lists all known package sources.
150
150
151
-
Key | Value
152
-
--- | ---
153
-
(name to assign to the package source) | The path or URL of the package source.
151
+
|Key | Value|
152
+
|--- | ---|
153
+
|(name to assign to the package source) | The path or URL of the package source.|
154
154
155
155
**Example**:
156
156
@@ -167,11 +167,11 @@ Key | Value
167
167
168
168
Stores usernames and passwords for sources, typically specified with the `-username` and `-password` switches with `nuget sources`. Passwords are encrypted by default unless the `-storepasswordincleartext` option is also used.
169
169
170
-
Key | Value
171
-
--- | ---
172
-
username | The user name for the source in plain text.
173
-
password | The encrypted password for the source.
174
-
cleartextpassword | The unencrypted password for the source.
170
+
|Key | Value|
171
+
|--- | ---|
172
+
|username | The user name for the source in plain text.|
173
+
|password | The encrypted password for the source.|
174
+
|cleartextpassword | The unencrypted password for the source.|
175
175
176
176
**Example:**
177
177
@@ -209,9 +209,9 @@ When using unencrypted passwords:
209
209
210
210
Stores keys for sources that use API key authentication, as set with the [`nuget setapikey` command](../tools/nuget-exe-cli-reference.md#setapikey).
211
211
212
-
Key | Value
213
-
--- | ---
214
-
(source URL) | The encrypted API key.
212
+
|Key | Value|
213
+
|--- | ---|
214
+
|(source URL) | The encrypted API key.|
215
215
216
216
**Example**:
217
217
@@ -226,9 +226,9 @@ Key | Value
226
226
227
227
Identified currently disabled sources. May be empty.
228
228
229
-
Key | Value
230
-
--- | ---
231
-
(name of source) | A Boolean indicating whether the source is disabled.
229
+
|Key | Value|
230
+
|--- | ---|
231
+
|(name of source) | A Boolean indicating whether the source is disabled.|
232
232
233
233
234
234
@@ -249,9 +249,9 @@ Key | Value
249
249
250
250
Identifies to the currently active source or indicates the aggregate of all sources.
251
251
252
-
Key | Value
253
-
--- | ---
254
-
(name of source) or `All` | If key is the name of a source, the value is the source path or URL. If `All`, value should be `(Aggregate source)` to combine all package sources that are not otherwise disabled.
252
+
|Key | Value|
253
+
|--- | ---|
254
+
|(name of source) or `All`| If key is the name of a source, the value is the source path or URL. If `All`, value should be `(Aggregate source)` to combine all package sources that are not otherwise disabled.|
255
255
256
256
**Example**:
257
257
@@ -274,32 +274,32 @@ Below is an example `NuGet.Config` file that illustrates a number of settings:
274
274
<?xml version="1.0" encoding="utf-8"?>
275
275
<configuration>
276
276
<config>
277
-
<!--
278
-
Used to specify the default location to expand packages.
0 commit comments