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
Similar to the other NuGet audit configuration properties, `NuGetAuditSuppress` items can be defined at the project or repository level.
100
+
101
+
`NuGetAuditSuppress` is available for PackageReference projects starting from NuGet 6.11, Visual Studio 17.11, and the .NET 8.0.400 SDK.
102
+
It is not currently available for packages.config projects.
103
+
104
+
Additionally, you have the option to suppress warnings based on their severity.
91
105
You can use `<NoWarn>` to suppress `NU1901`-`NU1904` warnings or use the `<NuGetAuditLevel>` functionality to ensure your audit reports are useful to your workflow.
Copy file name to clipboardExpand all lines: docs/consume-packages/configuring-nuget-behavior.md
+28-17Lines changed: 28 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.topic: conceptual
9
9
10
10
# Common NuGet configurations
11
11
12
-
NuGet's behavior is driven by the accumulated settings in one or more `NuGet.Config` (XML) files that can exist at solution- (project if no solution is used), user-, and computer-wide levels. A global `NuGetDefaults.Config` file also specifically configures package sources. Settings apply to all commands issued in the CLI, the Package Manager Console, and the Package Manager UI.
12
+
NuGet's behavior is driven by the accumulated settings in one or more config (XML) files that can exist at solution- (project if no solution is used), user-, and computer-wide levels.
13
13
14
14
## Config file locations and uses
15
15
@@ -58,29 +58,35 @@ Settings are managed using the NuGet CLI [config command](../reference/cli-refer
58
58
Windows:
59
59
60
60
```cli
61
-
# Set repositoryPath in the user-level config file
62
-
nuget config -set repositoryPath=c:\packages
61
+
# Set globalPackagesFolder in the user-level config file
62
+
dotnet nuget config set globalPackagesFolder "C:\packages"
63
+
64
+
# Set repositoryPath (available for packages.config only) in the user-level config file
65
+
dotnet nuget config set repositoryPath "C:\packages"
Copy the template below into the new file and then use `nuget config -configFile <filename>` to set values:
109
+
Using the .NET CLI, create a default nuget.config by running `dotnet new nugetconfig`.
110
+
For more information, see [dotnet CLI commands](../reference/dotnet-commands.md#package-consumption).
111
+
112
+
Alternatively, manually copy the template below into the new file and then use `nuget config -configFile <filename>` to set values:
104
113
105
114
```xml
106
115
<?xml version="1.0" encoding="utf-8"?>
@@ -116,7 +125,7 @@ If a command line tool is used on a project file, rather than a solution file, t
116
125
117
126
Specifically, when a config file is not specified explicitly on the command line, NuGet loads settings from the different config files in the following order:
118
127
119
-
1. The [`NuGetDefaults.Config` file](#nuget-defaults-file), which contains settings related only to package sources.
128
+
1.(*Uncommon*) The [`NuGetDefaults.Config` file](#nuget-defaults-file), which contains settings related only to package sources.
120
129
1. The computer-level file.
121
130
1. The user-level file.
122
131
1. Files found in every folder in the path from the drive root to the current folder (where `nuget.exe` is invoked or the folder containing the Visual Studio solution). For example, if a command is invoked in `c:\A\B\C`, NuGet looks for and loads config files in `c:\`, then `c:\A`, then `c:\A\B`, and finally `c:\A\B\C`.
@@ -154,9 +163,9 @@ File A. User-level file, (`%appdata%\NuGet\NuGet.Config` on Windows, `~/.config/
154
163
```xml
155
164
<?xml version="1.0" encoding="utf-8"?>
156
165
<configuration>
157
-
<activePackageSource>
158
-
<addkey="NuGet official package source"value="https://api.nuget.org/v3/index.json" />
@@ -226,7 +235,9 @@ These files cannot be edited by the standard tooling.
226
235
227
236
## NuGet defaults file
228
237
229
-
The `NuGetDefaults.Config` file exists to specify package sources from which packages are installed and updated, and to control the default target for publishing packages with `nuget push`. Because administrators can conveniently (using Group Policy, for example) deploy consistent `NuGetDefaults.Config` files to developer and build machines, they can ensure that everyone in the organization is using the correct package sources rather than nuget.org.
238
+
The `NuGetDefaults.Config` is uncommon and can only specify package sources from which packages are installed and updated, or control the default target for publishing packages with `nuget push`.
239
+
240
+
Because administrators can conveniently (using Group Policy, for example) deploy consistent `NuGetDefaults.Config` files to developer and build machines, they can ensure that everyone in the organization is using consistent package sources, whether or not that includes nuget.org.
230
241
231
242
> [!Important]
232
243
> The `NuGetDefaults.Config` file never causes a package source to be removed from a developer's NuGet configuration. That means if the developer has already used NuGet and therefore has the nuget.org package source registered, it won't be removed after the creation of a `NuGetDefaults.Config` file.
Copy file name to clipboardExpand all lines: docs/consume-packages/install-use-packages-visual-studio.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,9 +38,22 @@ To find and install a NuGet package with Visual Studio, follow these steps:
38
38
39
39
The **NuGet Package Manager** window opens.
40
40
41
-
1. Select the **Browse** tab to display packages by popularity from the currently selected source (see [Package sources](#package-sources)). To search for a specific package, use the search box on the upper left. Select a package from the list to display its information on the right pane, which enables you to select a version to install.
42
-
43
-
:::image type="content" source="media/package-manager-install-tab.png" alt-text="Screenshot showing the NuGet Package Manager window with the Browse tab selected.":::
41
+
1. Select the **Browse** tab to display packages by popularity from the currently selected source (see [Package sources](#package-sources)).
42
+
43
+
- To search for a specific package, use the search box on the upper left.
44
+
- Abbreviated information may be shown beside each package ID to help identify the correct package, and varies based on the selected package source(s).
45
+
Examples include package download count, author, or owner profile hyperlinks.
46
+
47
+
> [!Note]
48
+
> In Visual Studio 17.11 and higher, package owners are shown as profile hyperlinks when supported by the selected package source.
49
+
> Package ownership is defined by the package source. For example, see [Manage package owners on nuget.org](../nuget-org/publish-a-package.md#manage-package-owners-on-nugetorg).
50
+
>
51
+
> In Visual Studio 17.10 and earlier, the package _author_ metadata is shown, which appears as plain-text.
52
+
> For more information, see [Authors package metadata](../create-packages/package-authoring-best-practices.md#authors).
53
+
54
+
- Select a package to see detailed package information.
55
+
The details pane on the right appears and enables you to select a version to install.
56
+

44
57
45
58
1. In the right pane, select a **Version** from the dropdown list. If you want to include prerelease versions in the **Version** list, select **Include prerelease**.
Copy file name to clipboardExpand all lines: docs/reference/errors-and-warnings/NU5104.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
@@ -23,4 +23,4 @@ The project or nuspec being packaged contains a dependency on a prerelease packa
23
23
If you intend to create a prerelease package then please refer to SemVer2 guidelines and add a prerelease tag to the version property i.e. `<version>1.0.0-pre</version>`. If you intend to create a stable package then please update the specified dependency version to a stable version.
24
24
25
25
> [!NOTE]
26
-
> Mixing stable and prerelease packages may lead to unexpected behaviors are resolution time. Learn more about how [PackageReference](../../concepts/Dependency-Resolution.md#version-ranges-and-prerelease-versions-with-packagereference) and [packages.config](../../concepts/Dependency-Resolution.md#version-ranges-and-prerelease-versions-with-packagesconfig) projects handle this resolution.
26
+
> Mixing stable and prerelease packages may lead to unexpected behaviors at resolution time. Learn more about how [PackageReference](../../concepts/Dependency-Resolution.md#version-ranges-and-prerelease-versions-with-packagereference) and [packages.config](../../concepts/Dependency-Resolution.md#version-ranges-and-prerelease-versions-with-packagesconfig) projects handle this resolution.
Copy file name to clipboardExpand all lines: docs/reference/nuget-config-file.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
@@ -31,7 +31,7 @@ Contains miscellaneous configuration settings, which can be set using the [`nuge
31
31
| Key | Value |
32
32
| --- | --- |
33
33
| dependencyVersion (`packages.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`. |
34
-
| globalPackagesFolder (projects using PackageReference only) | The location of the default global packages folder. The default is `%userprofile%\.nuget\packages` (Windows) or `~/.nuget/packages` (Mac/Linux). A relative path can be used in project-specific `nuget.config` files. This setting is overridden by the `NUGET_PACKAGES` environment variable, which takes precedence. |
34
+
| globalPackagesFolder | The location of the default global packages folder. The default is `%userprofile%\.nuget\packages` (Windows) or `~/.nuget/packages` (Mac/Linux). A relative path can be used in project-specific `nuget.config` files. This setting is overridden by the `NUGET_PACKAGES` environment variable, which takes precedence. |
35
35
| 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. |
36
36
| 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. |
37
37
| 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). |
Copy file name to clipboardExpand all lines: docs/reference/nuspec.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,9 @@ In this topic:
35
35
36
36
## General form and schema
37
37
38
-
The current `nuspec.xsd` schema file can be found in the [NuGet GitHub repository](https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Packaging/compiler/resources/nuspec.xsd).
38
+
A `nuspec.xsd` schema file can be found in the [NuGet GitHub repository](https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Packaging/compiler/resources/nuspec.xsd).
39
+
Note, that this file only represents the most recent schema for a `.nuspec` file.
40
+
No officially published versions exists and no version of that file corresponds to any specific NuGet version.
39
41
40
42
Within this schema, a `.nuspec` file has the following general form:
41
43
@@ -64,6 +66,11 @@ All XML element names in the .nuspec file are case-sensitive, as is the case for
64
66
metadata element `<description>` is correct and `<Description>` is not correct. The proper casing for each element name
65
67
is documented below.
66
68
69
+
> [!Important]
70
+
> While the `.nuspec` file contains a reference to a schema
> The NuGet-Team has never published a schema file that could be used for automatic schema validation.
73
+
67
74
### Required metadata elements
68
75
69
76
Although the following elements are the minimum requirements for a package, you should consider adding the [optional metadata elements](#optional-metadata-elements) to improve the overall experience developers have with your package.
Copy file name to clipboardExpand all lines: docs/release-notes/NuGet-6.10.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,20 @@ NuGet distribution vehicles:
12
12
13
13
| NuGet version | Available in Visual Studio version | Available in .NET SDK(s) |
14
14
|:---|:---|:---|
15
-
|[**6.10**](https://nuget.org/downloads)|[Visual Studio 2022 version 17.10](https://visualstudio.microsoft.com/downloads/)|[8.0.3xx](https://dotnet.microsoft.com/download/dotnet/8.0)<sup>1</sup> |
15
+
|[**6.10.1**](https://nuget.org/downloads)|[Visual Studio 2022 version 17.10](https://visualstudio.microsoft.com/downloads/)|[8.0.3xx](https://dotnet.microsoft.com/download/dotnet/8.0)<sup>1</sup> |
16
16
17
17
<sup>1</sup> Installed with Visual Studio 2022 with any .NET workload
18
18
19
+
## Summary: What's New in 6.10.1
20
+
21
+
### Issues fixed in this release
22
+
23
+
* Visual Studio and PMC restore/update fails when multiple packages.config projects in the solution share the same name (An item with the same key has already been added) - [#13465](https://github.com/NuGet/Home/issues/13465)
24
+
25
+
* ##[error]The nuget command failed with exit code(1) and error(An item with the same key has already been added. - [#13456](https://github.com/NuGet/Home/issues/13456)
26
+
27
+
[List of commits in this release](https://github.com/NuGet/NuGet.Client/compare/6.10.0.97...6.10.1.5)
0 commit comments