Skip to content

Commit e4782f2

Browse files
jgonz120ericstjNigusu-Allehudonnie-msftOliaG
authored
Publish main to live (#3383)
* Add best practice to Package-Versioning.md (#3353) * Update Nu1302 documentation with more information (#3363) * Update NuGet-6.12 Release Notes for 6.12.3 (#3378) * Adding No README chapter (#3381) * Adding No README chapter * Minor update * Updated text to address review comments --------- Co-authored-by: Eric StJohn <[email protected]> Co-authored-by: Nigusu Solomon Yenework <[email protected]> Co-authored-by: Donnie Goodson <[email protected]> Co-authored-by: Olia Gavrysh <[email protected]>
1 parent 448ecde commit e4782f2

File tree

4 files changed

+56
-5
lines changed

4 files changed

+56
-5
lines changed

docs/concepts/Package-Versioning.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ When referring to package dependencies, NuGet supports using interval notation f
116116
| [1.0,2.0) | 1.0 ≤ x < 2.0 | Mixed inclusive minimum and exclusive maximum version |
117117
| (1.0) | invalid | invalid |
118118

119-
### Examples
119+
### Best Practice
120120

121-
Always specify a version or version range for package dependencies in project files, `packages.config` files, and `.nuspec` files. Without a version or version range, NuGet 2.8.x and earlier chooses the latest available package version when resolving a dependency, whereas NuGet 3.x and later chooses the lowest package version. Specifying a version or version range avoids this uncertainty.
121+
Always specify a version or version range for package dependencies in project files, `packages.config` files, and `.nuspec` files. Without a version or version range, when resolving a dependency, consistent restore results are not guaranteed.
122+
Avoid specifying an upper bound to version ranges to packages you don't own unless you know of a compatibility problem. Upper bounds to version ranges harm adoption, discourage consumers from getting valuable updates to dependencies, and in some cases may lead them to use unsupported versions of dependencies.
122123

123124
#### References in project files (PackageReference)
124125

docs/reference/errors-and-warnings/NU1302.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,47 @@ f1_keywords:
88
- "NU1302"
99
---
1010

11-
# NuGet Warning NU1302
11+
# NuGet Error NU1302
1212

1313
> You are running the 'restore' operation with an 'HTTP' source: myHttpSource. NuGet requires HTTPS sources. To use an HTTP source, you must explicitly set 'allowInsecureConnections' to true in your NuGet.Config file. Please refer to https://aka.ms/nuget-https-everywhere for more information.
1414
1515
### Issue
1616

17-
`myHttpSource` is an insecure HTTP source. We recommend using HTTPS sources instead.
17+
`myHttpSource` is an insecure HTTP source. We recommend using an HTTPS source instead.
1818

1919
### Solution
2020

21-
This can be fixed either by removing the HTTP source or disabling HTTP Errors for the specific source by using `allowInsecureConnections` option in your [NuGet config file](../../reference/nuget-config-file.md).
21+
#### Option 1: Update the Source to Use HTTPS
22+
23+
If possible, update the package source to use `https://` instead of `http://`:
24+
25+
```xml
26+
<configuration>
27+
<packageSources>
28+
<add key="SecureSource" value="https://example.com/nuget/" />
29+
</packageSources>
30+
</configuration>
31+
```
32+
33+
#### Option 2: Allow Insecure Connections (If Necessary)
34+
35+
If the source must remain HTTP, explicitly allow insecure connections by adding the `AllowInsecureConnections` flag in the `NuGet.Config`:
36+
37+
```xml
38+
<configuration>
39+
<packageSources>
40+
<add key="InsecureSource" value="http://example.com/nuget/" allowInsecureConnections="true" />
41+
</packageSources>
42+
</configuration>
43+
```
44+
45+
#### Option 3: Consult SDK Analysis Level
46+
47+
The [`SdkAnalysisLevel`](/dotnet/core/project-sdk/msbuild-props#sdkanalysislevel) property in your project can serve as a temporary workaround for managing HTTP sources.
48+
If additional time is needed to resolve the HTTP error, you can lower the `SdkAnalysisLevel` to suppress errors temporarily.
49+
Here's how it functions:
50+
51+
- For SDK Analysis Level value **below 9.0.100**, using HTTP sources triggers a warning ([NU1803](NU1803.md)).
52+
- Starting with SDK Analysis Level **9.0.100 or higher**, HTTP sources result in an error (NU1302) unless `AllowInsecureConnections` is explicitly enabled.
53+
54+

docs/release-notes/NuGet-6.12.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ NuGet distribution vehicles:
2424
* VS PM UI shows warning icon about package vulnerability even after upgrade [#13866](https://github.com/NuGet/Home/issues/13866)
2525
* dotnet nuget why reports missing argument, even though it ran [#13908](https://github.com/NuGet/Home/issues/13908)
2626

27+
## Summary: What's New in 6.12.3
28+
29+
NuGet 6.12.3 is available in Visual Studio 17.12.4.
30+
31+
### Issues fixed in this release
32+
33+
* Small Solution PM UI size can cause a System.ArgumentException SolutionView.ListView_SizeChanged - [#13928](https://github.com/NuGet/Home/issues/13928)
34+
2735
## Summary: What's New in 6.12.1
2836

2937
NuGet 6.12.1 is available in Visual Studio 17.12.0 and the .NET 9.0.101 SDK.

docs/resources/NuGet-FAQ.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,12 @@ sections:
179179
If the `target` has been modified manually, NuGet might not be able to detect that it needs removed when migrating.
180180
181181
If your project is `PackageReference` and you still have this target in project file, it should be safe to remove.
182+
183+
- question: |
184+
There is no README in Visual Studio NuGet Package Manager for the selected package.
185+
answer: |
186+
If you see the message "There is no README available for the selected package version" in Visual Studio NuGet Package Manager, that means that the selected version of the NuGet package does not have an embedded README file.
187+
- If this is not the latest version of the package, consider checking the latest version.
188+
- If the latest version doesn't have the README file embedded either, and you are not the maintainer of this package, consider filing an issue or contacting the maintainer to request a README.
189+
- If you are the maintainer of the package, here is the guide on [how to embed the README in your package](https://aka.ms/nuget/readme). Please note that if you have added the README file on NuGet.org but didn't embed it in your package, the README will not be shown in Visual Studio.
190+

0 commit comments

Comments
 (0)