Skip to content

Commit 19286ea

Browse files
CamSopergewarren
andauthored
[Breaking change]: Promote HTTP Warnings to Errors in dotnet package list and dotnet package search (#46074)
* [Breaking change]: Promote HTTP Warnings to Errors in dotnet package list and dotnet package search Fixes #45985 * Fix formatting in HTTP warnings documentation for affected APIs section * Update docs/core/compatibility/sdk/10.0/http-warnings-to-errors.md Co-authored-by: Genevieve Warren <[email protected]> * Update docs/core/compatibility/10.0.md Co-authored-by: Genevieve Warren <[email protected]> * Update docs/core/compatibility/toc.yml Co-authored-by: Genevieve Warren <[email protected]> * Added source compatibility * Fix formatting in note section of HTTP warnings documentation * Revert to just behavioral change --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent 01409b0 commit 19286ea

File tree

3 files changed

+65
-8
lines changed

3 files changed

+65
-8
lines changed

docs/core/compatibility/10.0.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
6262

6363
## SDK and MSBuild
6464

65-
| Title | Type of change | Introduced version |
66-
|----------------------------------------------------------------------------------------------------------------------|---------------------|--------------------|
67-
| [.NET CLI `--interactive` defaults to `true` in user scenarios](sdk/10.0/dotnet-cli-interactive.md) | Behavioral change | Preview 3 |
68-
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
69-
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
70-
| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
71-
| [MSBuild custom culture resource handling](sdk/10.0/msbuild-custom-culture.md) | Behavioral change | Preview 1 |
72-
| [NU1510 is raised for direct references pruned by NuGet](sdk/10.0/nu1510-pruned-references.md) | Source incompatible | Preview 1 |
65+
| Title | Type of change | Introduced version |
66+
|------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|--------------------|
67+
| [.NET CLI `--interactive` defaults to `true` in user scenarios](sdk/10.0/dotnet-cli-interactive.md) | Behavioral change | Preview 3 |
68+
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
69+
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
70+
| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
71+
| [MSBuild custom culture resource handling](sdk/10.0/msbuild-custom-culture.md) | Behavioral change | Preview 1 |
72+
| [NU1510 is raised for direct references pruned by NuGet](sdk/10.0/nu1510-pruned-references.md) | Source incompatible | Preview 1 |
73+
| [HTTP warnings promoted to errors in `dotnet package list` and `dotnet package search`](sdk/10.0/http-warnings-to-errors.md) | Behavioral/source incompatible change | Preview 4 |
7374

7475
## Windows Forms
7576

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Breaking change - HTTP warnings promoted to errors in dotnet package list and dotnet package search"
3+
description: "Learn about the breaking change in .NET 10 Preview 4 where HTTP warnings are promoted to errors in dotnet package operations."
4+
ms.date: 5/9/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/45985
7+
---
8+
9+
# HTTP warnings promoted to errors in `dotnet package list` and `dotnet package search`
10+
11+
Starting in .NET 10 Preview 4, HTTP warnings generated by `dotnet package list`, `dotnet package search`, and related APIs are now treated as errors by default.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 4
16+
17+
## Previous behavior
18+
19+
Previously, when using HTTP sources, the tools displayed a warning, such as:
20+
21+
```output
22+
You are running the 'list package' operation with an 'HTTP' source, 'http://api.source/index.json'. Non-HTTPS access will be removed in a future version. Consider migrating to an 'HTTPS' source.
23+
```
24+
25+
The operation continued without interruption.
26+
27+
## New behavior
28+
29+
The tools now treat HTTP sources as errors by default. To allow HTTP sources, explicitly set `allowInsecureConnections="true"` in *nuget.config*.
30+
31+
## Type of breaking change
32+
33+
This is a [behavioral change](../../categories.md#behavioral-change).
34+
35+
## Reason for change
36+
37+
This change improves security by blocking insecure HTTP sources by default. It aligns with secure-by-default practices to protect users from potential vulnerabilities.
38+
39+
## Recommended action
40+
41+
Migrate to HTTPS sources to avoid the error. To continue using HTTP sources, update your *nuget.config* file to include the following setting:
42+
43+
```xml
44+
<add key="allowInsecureConnections" value="true" />
45+
```
46+
47+
## Affected APIs
48+
49+
- `dotnet package list`
50+
- `dotnet package search`
51+
- `NuGet.Protocol.Core.Types.PackageUpdateResource.PushAsync`
52+
- `NuGet.Protocol.Core.Types.PackageUpdateResource.Delete`

docs/core/compatibility/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ items:
6464
href: sdk/10.0/msbuild-custom-culture.md
6565
- name: NU1510 is raised for direct references pruned by NuGet
6666
href: sdk/10.0/nu1510-pruned-references.md
67+
- name: HTTP warnings promoted to errors in 'dotnet package list' and 'dotnet package search'
68+
href: sdk/10.0/http-warnings-to-errors.md
6769
- name: Windows Forms
6870
items:
6971
- name: API obsoletions
@@ -1952,6 +1954,8 @@ items:
19521954
href: sdk/10.0/msbuild-custom-culture.md
19531955
- name: NU1510 is raised for direct references pruned by NuGet
19541956
href: sdk/10.0/nu1510-pruned-references.md
1957+
- name: HTTP warnings promoted to errors in dotnet package list and dotnet package search
1958+
href: sdk/10.0/http-warnings-to-errors.md
19551959
- name: .NET 9
19561960
items:
19571961
- name: "`dotnet sln add` doesn't allow invalid file names"

0 commit comments

Comments
 (0)