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: docs/Consume-Packages/Reinstalling-and-Updating-Packages.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,15 +27,16 @@ Updating and reinstalling packages is accomplished as follows:
27
27
| Package Manager UI | On the **Updates** tab, select one or more packages and select **Update**| On the **Installed** tab, select a package, record its name, then select **Uninstall**. Switch to the **Browse** tab, search for the package name, select it, then select **Install**). |
28
28
| nuget.exe CLI |`nuget update` command | For all packages, delete the package folder, then run `nuget install`. For a single package, delete the package folder and use `nuget install <id>` to reinstall the same one. |
29
29
30
-
In this topic:
30
+
In this article:
31
+
31
32
-[When to Reinstall a Package](#when-to-reinstall-a-package)
1.**Broken references after package restore**: If you've opened a project and restored NuGet packages, but still see broken references, try reinstalling each of those packages.
37
38
1.**Project is broken due to deleted files**: NuGet does not prevent you from removing items added from packages, so it's easy to inadvertently modify contents installed from a package and break your project. To restore the project, reinstall the affected packages.
38
-
1.**Package update broke the project**: If an update to a package breaks a project, the failure is generally caused by a dependency package which may have also been. To restore the state of the dependency, reinstall that specific package.
39
+
1.**Package update broke the project**: If an update to a package breaks a project, the failure is generally caused by a dependency package which may have also been updates. To restore the state of the dependency, reinstall that specific package.
39
40
1.**Project retargeting or upgrade**: This can be useful when a project has been retargeted or upgraded and if the package requires reinstallation due to the change in target framework. NuGet 2.7 and later shows a build error in such cases immediately after project retargeting, and subsequent build warnings let you know that the package may need to be reinstalled. For project upgrade, NuGet shows an error in the Project Upgrade Log.
40
41
1.**Reinstalling a package during its development**: Package authors often need to reinstall the same version of package they're developing to test the behavior. The `Install-Package` command does not provide an option to force a reinstall, so use `Update-Package -reinstall` instead.
Copy file name to clipboardExpand all lines: docs/Quickstart/Create-and-Publish-a-Package.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Every NuGet package needs a manifest—a `.nuspec` file—to describe it
54
54
nuget spec
55
55
```
56
56
57
-
1. Open the file in a text editor. The manifest looks something like the code below, where tokens in the form *$`<token>`$* are be replaced during the packaging process with values from the project's Properties/AssemblyInfo.cs file. For more details on tokens, see [Creating a .nuspec file](../create-packages/creating-a-package.md#creating-the-nuspec-file).
57
+
1. Open the file in a text editor. The manifest looks something like the code below, where tokens in the form `<token>` (such as `$id$`) are be replaced during the packaging process with values from the project's Properties/AssemblyInfo.cs file. For more details on tokens, see [Creating a .nuspec file](../create-packages/creating-a-package.md#creating-the-nuspec-file).
Copy file name to clipboardExpand all lines: docs/Quickstart/Use-a-Package.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,8 @@ ms.reviewer:
17
17
18
18
# Install and use a package
19
19
20
+
NuGet packages are units of reusable code that other developers make available to you for use in your projects. See [What is NuGet?](../What-is-NuGet.md) for background.
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.
@@ -62,7 +62,6 @@ Note: `dependencyVersion` and `repositoryPath` apply only to projects using `pac
62
62
| 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. |
63
63
| 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). |
64
64
65
-
66
65
**Example**:
67
66
68
67
```xml
@@ -74,7 +73,6 @@ Note: `dependencyVersion` and `repositoryPath` apply only to projects using `pac
74
73
</config>
75
74
```
76
75
77
-
78
76
## bindingRedirects section
79
77
80
78
Configures whether NuGet does automatic binding redirects when a package is installed.
@@ -119,7 +117,6 @@ Controls whether the `packages` folder of a solution is included in source contr
119
117
| --- | --- |
120
118
| disableSourceControlIntegration | A Boolean indicating whether to ignore the packages folder when working with source control. The default value is false. |
121
119
122
-
123
120
**Example**:
124
121
125
122
```xml
@@ -128,13 +125,13 @@ Controls whether the `packages` folder of a solution is included in source contr
128
125
</solution>
129
126
```
130
127
131
-
132
128
## Package source sections
133
129
134
130
The `packageSources`, `packageSourceCredentials`, `apikeys`, `activePackageSource`, and `disabledPackageSources` all work together to configure how NuGet works with package repositories during install, restore, and update operations.
135
131
136
132
The [`nuget sources` command](../tools/cli-ref-sources.md) is generally used to manage these settings, except for `apikeys` which is managed using the [`nuget setapikey` command](../tools/cli-ref-setapikey.md).
137
133
134
+
Note that the source URL for nuget.org is `https://api.nuget.org/v3/index.json`.
138
135
139
136
### packageSources
140
137
@@ -154,7 +151,6 @@ Lists all known package sources.
154
151
</packageSources>
155
152
```
156
153
157
-
158
154
### packageSourceCredentials
159
155
160
156
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.
@@ -193,7 +189,7 @@ When using unencrypted passwords:
Copy file name to clipboardExpand all lines: docs/Schema/nuspec.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,8 +168,8 @@ And you build an assembly whose `AssemblyName` is `LoggingLibrary` with the `Rel
168
168
The `<dependencies>` element within `<metadata>` contains any number of `<dependency>` elements that identify other packages upon which the top-level package depends. The attributes for each `<dependency>` are as follows:
169
169
170
170
| Attribute | Description |
171
-
| --- | --- |
172
-
|`id`| (Required) The package ID of the dependency. |
171
+
| --- | --- |
172
+
|`id`| (Required) The package ID of the dependency, such as "EntityFramework" and "NUnit", which is the name of the package nuget.org shows on a package page. |
173
173
|`version`| (Required) The range of versions acceptable as a dependency. See [Package versioning](../reference/package-versioning.md#version-ranges-and-wildcards) for exact syntax. |
174
174
| include | A comma-delimited list of include/exclude tags (see below) indicating of the dependency to include in the final package. The default value is `none`. |
175
175
| exclude | A comma-delimited list of include/exclude tags (see below) indicating of the dependency to exclude in the final package. The default value is `all`. Tags specified with `exclude` take precedence over those specified with `include`. For example, `include="runtime, compile" exclude="compile"` is the same as `include="runtime"`. |
where `<name>` and `<value>` specify a key-value pair to be set in the configuration. You can specify as many pairs as desired. To remove a value, specify the name and the `=` sign but no value.
32
32
33
+
For allowable key names, see the [NuGet config file reference](../Schema/nuget-config-file.md).
34
+
33
35
In NuGet 3.4+, `<value>` can use [environment variables](cli-ref-environment-variables.md).
where `<operation>` is one of *List, Add, Remove, Enable, Disable,* or *Update*, `<name>` is the name of the source, and `<source>` is the source's URL.
0 commit comments