Skip to content

Commit b612430

Browse files
Merge pull request #47944 from dotnet/main
Merge main into live
2 parents 93618af + 441d490 commit b612430

24 files changed

+370
-85
lines changed

docs/azure/includes/dotnet-all.md

Lines changed: 18 additions & 18 deletions
Large diffs are not rendered by default.

docs/azure/includes/dotnet-new.md

Lines changed: 15 additions & 15 deletions
Large diffs are not rendered by default.

docs/core/compatibility/10.0.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
2424
| [Exception diagnostics suppressed when TryHandleAsync returns true](aspnet-core/10/exception-handler-diagnostics-suppressed.md) | Behavioral change | Preview 7 |
2525
| [IActionContextAccessor and ActionContextAccessor are obsolete](aspnet-core/10/iactioncontextaccessor-obsolete.md) | Source incompatible/behavioral change | Preview 7 |
2626
| [IncludeOpenAPIAnalyzers property and MVC API analyzers are deprecated](aspnet-core/10/openapi-analyzers-deprecated.md) | Source incompatible | Preview 7 |
27+
| [IPNetwork and ForwardedHeadersOptions.KnownNetworks are obsolete](aspnet-core/10/ipnetwork-knownnetworks-obsolete.md) | Source incompatible | Preview 7 |
2728
| [Microsoft.Extensions.ApiDescription.Client package deprecated](aspnet-core/10/apidescription-client-deprecated.md) | Source incompatible | Preview 7 |
2829
| [Razor run-time compilation is obsolete](aspnet-core/10/razor-runtime-compilation-obsolete.md) | Source incompatible | Preview 7 |
2930

@@ -42,13 +43,18 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
4243
| [Consistent shift behavior in generic math](core-libraries/10.0/generic-math.md) | Behavioral change | Preview 1 |
4344
| [Default trace context propagator updated to W3C standard](core-libraries/10.0/default-trace-context-propagator.md) | Behavioral change | Preview 4 |
4445
| [DriveInfo.DriveFormat returns Linux filesystem types](core-libraries/10.0/driveinfo-driveformat-linux.md) | Behavioral change | Preview 6 |
46+
| [DynamicallyAccessedMembers annotation removed from DefaultValueAttribute ctor](core-libraries/10.0/defaultvalueattribute-dynamically-accessed-members.md) | Binary/source incompatible | Preview 7 |
4547
| [GnuTarEntry and PaxTarEntry no longer includes atime and ctime by default](core-libraries/10.0/tar-atime-ctime-default.md) | Behavioral change | Preview 5 |
4648
| [LDAP DirectoryControl parsing is now more stringent](core-libraries/10.0/ldap-directorycontrol-parsing.md) | Behavioral change | Preview 1 |
4749
| [MacCatalyst version normalization](core-libraries/10.0/maccatalyst-version-normalization.md) | Behavioral change | Preview 1 |
4850
| [.NET runtime no longer provides default SIGTERM signal handler](core-libraries/10.0/sigterm-signal-handler.md) | Behavioral change | Preview 5 |
4951
| [System.Linq.AsyncEnumerable included in core libraries](core-libraries/10.0/asyncenumerable.md) | Source incompatible | Preview 1 |
5052
| [YMM embedded rounding removed from AVX10.2](core-libraries/10.0/ymm-embedded-rounding.md) | Behavioral change | Preview 5 |
5153

54+
## Entity Framework Core
55+
56+
[Breaking changes in EF Core 10](/ef/core/what-is-new/ef-core-10.0/breaking-changes)
57+
5258
## Extensions
5359

5460
| Title | Type of change | Introduced version |
@@ -98,10 +104,12 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
98104
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
99105
| [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 |
100106
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
107+
| [SHA-1 fingerprint support deprecated in `dotnet nuget sign`](sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md) | Behavioral change | Preview 1 |
101108
| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
102109
| [MSBuild custom culture resource handling](sdk/10.0/msbuild-custom-culture.md) | Behavioral change | Preview 1 |
103110
| [NU1510 is raised for direct references pruned by NuGet](sdk/10.0/nu1510-pruned-references.md) | Source incompatible | Preview 1 |
104111
| [PackageReference without a version raises an error](sdk/10.0/nu1015-packagereference-version.md) | Behavioral change | Preview 6 |
112+
| [PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none](sdk/10.0/prune-packagereference-privateassets.md) | Behavioral change | Preview 7 |
105113
| [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 |
106114
| [NUGET_ENABLE_ENHANCED_HTTP_RETRY environment variable removed](sdk/10.0/nuget-enhanced-http-retry-removed.md) | Behavioral change | Preview 6 |
107115

docs/core/compatibility/9.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff
6868
|-----------------------------------------------------------------------------------------------------|---------------------|--------------------|
6969
| [Deprecated desktop Windows/macOS/Linux MonoVM runtime packages](deployment/9.0/monovm-packages.md) | Source incompatible | Preview 7 |
7070

71+
## Entity Framework Core
72+
73+
[Breaking changes in EF Core 9](/ef/core/what-is-new/ef-core-9.0/breaking-changes)
74+
7175
## Interop
7276

7377
| Title | Type of change | Introduced version |
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "Breaking change: IPNetwork and ForwardedHeadersOptions.KnownNetworks are obsolete"
3+
description: Learn about the breaking change in ASP.NET Core 10.0 where IPNetwork and ForwardedHeadersOptions.KnownNetworks have been obsoleted in favor of System.Net.IPNetwork and KnownIPNetworks.
4+
ms.date: 08/08/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/aspnet/Announcements/issues/523
7+
---
8+
# IPNetwork and ForwardedHeadersOptions.KnownNetworks are obsolete
9+
10+
<xref:Microsoft.AspNetCore.HttpOverrides.IPNetwork?displayProperty=fullName> and <xref:Microsoft.AspNetCore.Builder.ForwardedHeadersOptions.KnownNetworks> have been marked as obsolete in favor of using <xref:System.Net.IPNetwork?displayProperty=fullName> and `KnownIPNetworks`.
11+
12+
## Version introduced
13+
14+
.NET 10 Preview 7
15+
16+
## Previous behavior
17+
18+
Previously, you could use <xref:Microsoft.AspNetCore.HttpOverrides.IPNetwork?displayProperty=fullName> and <xref:Microsoft.AspNetCore.Builder.ForwardedHeadersOptions.KnownNetworks> to configure known networks for the forwarded headers middleware:
19+
20+
```csharp
21+
app.UseForwardedHeaders(new ForwardedHeadersOptions
22+
{
23+
KnownNetworks.Add(new(IPAddress.Loopback, 8))
24+
});
25+
```
26+
27+
## New behavior
28+
29+
Starting in .NET 10, if you use [the obsolete APIs](#affected-apis) in your code, you'll get warning `ASPDEPR005` at compile time:
30+
31+
> warning ASPDEPR005: Please use KnownIPNetworks instead. For more information, visit <https://aka.ms/aspnet/deprecate/005>.
32+
33+
Use the <xref:System.Net.IPNetwork?displayProperty=fullName> type and `KnownIPNetworks` property instead.
34+
35+
## Type of breaking change
36+
37+
This change can affect [source compatibility](../../categories.md#source-compatibility).
38+
39+
## Reason for change
40+
41+
<xref:System.Net.IPNetwork?displayProperty=fullName> has replaced the <xref:Microsoft.AspNetCore.HttpOverrides.IPNetwork?displayProperty=fullName> type that was implemented for <xref:Microsoft.AspNetCore.HttpOverrides.ForwardedHeadersMiddleware>.
42+
43+
## Recommended action
44+
45+
Change to using <xref:System.Net.IPNetwork?displayProperty=fullName> and `KnownIPNetworks`.
46+
47+
## Affected APIs
48+
49+
- <xref:Microsoft.AspNetCore.HttpOverrides.IPNetwork?displayProperty=fullName>
50+
- <xref:Microsoft.AspNetCore.Builder.ForwardedHeadersOptions.KnownNetworks?displayProperty=fullName>

docs/core/compatibility/core-libraries/10.0/asyncenumerable.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,37 @@ The <xref:System.Linq.AsyncEnumerable> class in .NET 10, and in the [`System.Lin
2424

2525
## Type of breaking change
2626

27-
This is a [source incompatible](../../categories.md#source-compatibility) change.
27+
This change can affect [source compatibility](../../categories.md#source-compatibility).
2828

2929
## Reason for change
3030

3131
<xref:System.Collections.Generic.IAsyncEnumerable`1> is a commonly used interface, so the platform itself should provide LINQ support for the type. Maintainers of `System.Linq.Async` and other community members petitioned for inclusion directly in the platform.
3232

3333
## Recommended action
3434

35-
If upgrading to .NET 10 and the code includes a direct package reference to `System.Linq.Async`, remove that package reference. For multitargeting both .NET 10 and previous versions, add a package reference to `System.Linq.AsyncEnumerable` instead.
35+
If you're upgrading to .NET 10 and your code includes a direct package reference to `System.Linq.Async`, remove that package reference. For multitargeting both .NET 10 and a previous version, add a package reference to `System.Linq.AsyncEnumerable` instead.
3636

37-
If `System.Linq.Async` is consumed indirectly via another package, avoid ambiguity errors by including this in the project:
37+
If `System.Linq.Async` is consumed indirectly via another package, avoid ambiguity errors by adding `<ExcludeAssets>` metadata with a value of `compile` or `all`:
3838

39-
```xml
40-
<PackageReference Include="System.Linq.Async" Version="6.0.1">
41-
<ExcludeAssets>all</ExcludeAssets>
42-
</PackageReference>
43-
```
39+
- To allow transitive use of `System.Linq.Async`, set `<ExcludeAssets>` to `compile`:
40+
41+
```xml
42+
<PackageReference Include="System.Linq.Async" Version="6.0.1">
43+
<ExcludeAssets>compile</ExcludeAssets>
44+
</PackageReference>
45+
```
46+
47+
This configuration prevents direct usage in your code while allowing other packages to continue using System.Linq.Async internally.
48+
49+
- For complete exclusion, set `<ExcludeAssets>` to `all`:
50+
51+
```xml
52+
<PackageReference Include="System.Linq.Async" Version="6.0.1">
53+
<ExcludeAssets>all</ExcludeAssets>
54+
</PackageReference>
55+
```
56+
57+
Use this configuration only if you're certain no dependencies require System.Linq.Async at run time.
4458

4559
Most consuming code should be compatible without changes, but some call sites might need updates to refer to newer names and signatures. For example, a `Select` call like `e.Select(i => i * 2)` will work the same before and after. However, the call `e.SelectAwait(async (int i, CancellationToken ct) => i * 2)` will need to be changed to use `Select` instead of `SelectAwait`, as in `e.Select(async (int i, CancellationToken ct) => i * 2)`.
4660

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Breaking change: 'DynamicallyAccessedMembers' annotation removed from 'DefaultValueAttribute' ctor"
3+
description: "Learn about the breaking change in .NET 10 where a 'DefaultValueAttribute' constructor is no longer annotated with 'DynamicallyAccessedMembers'."
4+
ms.date: 08/11/2025
5+
ai-usage: ai-assisted
6+
---
7+
8+
# `DynamicallyAccessedMembers` annotation removed from `DefaultValueAttribute` ctor
9+
10+
The <xref:System.ComponentModel.DefaultValueAttribute.%23ctor(System.Type,System.String)?displayProperty=nameWithType> constructor is no longer annotated with <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute>. This constructor is not supported with trimming and throws an exception if reached at run time in a trimmed app.
11+
12+
## Version introduced
13+
14+
.NET 10 Preview 7
15+
16+
## Previous behavior
17+
18+
Previously, if the constructor was used in a trimmed app and the feature switch to disable exception throwing was used, publishing the app generated a trimming warning, and there was a chance the code worked at run time.
19+
20+
## New behavior
21+
22+
Starting in .NET 10, if the constructor is used in a trimmed app and the feature switch to disable exception throwing is used, publishing the app still generates a trimming warning. But there's a smaller chance the code will work at run time.
23+
24+
## Type of breaking change
25+
26+
This change can affect [binary compatibility](../../categories.md#binary-compatibility) and [source compatibility](../../categories.md#source-compatibility).
27+
28+
## Reason for change
29+
30+
This attribute should not be used in trimmed apps because it doesn't reliably work. Trimming should be free to remove type members mentioned in the attribute.
31+
32+
## Recommended action
33+
34+
Don't enable the feature switch that attempts to make <xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute> (unreliably) work in trimmed apps.
35+
36+
## Affected APIs
37+
38+
- <xref:System.ComponentModel.DefaultValueAttribute.%23ctor(System.Type,System.String)>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "Breaking change - SHA-1 fingerprint support deprecated in dotnet nuget sign"
3+
description: "Learn about the breaking change in .NET 10 where SHA-1 fingerprint support is deprecated in dotnet nuget sign command, promoting NU3043 warning to error."
4+
ms.date: 08/11/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/47449
7+
---
8+
9+
# SHA-1 fingerprint support deprecated in `dotnet nuget sign`
10+
11+
Starting in .NET 10, the [NU3043](/nuget/reference/errors-and-warnings/nu3043) warning is promoted to an error when using SHA-1 fingerprints with the [`dotnet nuget sign` command](../../../tools/dotnet-nuget-sign.md). This change enforces the use of only strong, approved hash algorithms (SHA-2 family) for signing operations.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 1
16+
17+
## Previous behavior
18+
19+
In .NET 9 SDK, the `dotnet nuget sign` command accepted certificate fingerprints using SHA-1 and SHA-2 family algorithms (SHA256, SHA384, SHA512). If a SHA-1 fingerprint was used, a warning (NU3043) was issued, indicating the use of an insecure hashing algorithm, but the operation continued successfully.
20+
21+
## New behavior
22+
23+
Starting in .NET 10, the NU3043 warning is elevated to an error. This change blocks the use of SHA-1 fingerprints with the `--certificate-fingerprint` option in the `dotnet nuget sign` command, improving overall signing security.
24+
25+
## Type of breaking change
26+
27+
This is a [behavioral change](../../categories.md#behavioral-change).
28+
29+
## Reason for change
30+
31+
This change was made to enforce stronger security standards by disallowing the use of SHA-1 for certificate fingerprinting. SHA-1 is considered cryptographically weak and vulnerable to collision attacks.
32+
33+
## Recommended action
34+
35+
Update the usage of `dotnet nuget sign` to use fingerprints from the SHA-2 family only:
36+
37+
- SHA256 (recommended)
38+
- SHA384
39+
- SHA512
40+
41+
## Affected APIs
42+
43+
None.
44+
45+
## See also
46+
47+
- [dotnet nuget sign](../../../tools/dotnet-nuget-sign.md)
48+
- [NuGet warning NU3043](/nuget/reference/errors-and-warnings/nu3043)

docs/core/compatibility/sdk/10.0/nu1510-pruned-references.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: "Breaking change - NU1510 is raised for direct references pruned by NuGet"
3-
description: "Learn about the breaking change in .NET 10 where NU1510 is raised for unnecessary direct package references."
4-
ms.date: 3/25/2025
3+
description: "Learn about the breaking change in the .NET 10 SDK where NU1510 is raised for unnecessary direct package references."
4+
ms.date: 08/11/2025
55
ai-usage: ai-assisted
66
ms.custom: https://github.com/dotnet/docs/issues/45462
77
---
88

99
# NU1510 is raised for direct references pruned by NuGet
1010

11-
Starting in .NET 10, NuGet raises a [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) when a project includes a direct package reference that overlaps with a framework-provided library and is not required.
11+
Starting in .NET 10, NuGet raises a [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) when a project includes a direct package reference that overlaps with a framework-provided library and isn't required.
1212

1313
## Version introduced
1414

@@ -20,11 +20,14 @@ Previously, the .NET SDK ignored the contents of a package if it overlapped with
2020

2121
## New behavior
2222

23-
NuGet now removes unnecessary package references entirely and raises a `NU1510` warning to notify you of the issue.
23+
Starting in .NET 10, NuGet handles any unnecessary package references by raising a `NU1510` warning to notify you of the issue.
24+
25+
> [!NOTE]
26+
> In a later .NET 10 preview, this behavior changed again such that direct prunable package references are automatically excluded from the `.nuspec` file. For more information, see [PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none](prune-packagereference-privateassets.md).
2427
2528
## Type of breaking change
2629

27-
This is a [source-incompatible change](../../categories.md#source-compatibility).
30+
This change can affect [source compatibility](../../categories.md#source-compatibility).
2831

2932
## Reason for change
3033

@@ -50,3 +53,7 @@ If your project targets only frameworks where the package is pruned, remove the
5053
## Affected APIs
5154

5255
None.
56+
57+
## See also
58+
59+
- [PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none](prune-packagereference-privateassets.md)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: "Breaking change - PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none"
3+
description: "Learn about the breaking change in the .NET 10 SDK where PrunePackageReference automatically marks directly prunable PackageReference with PrivateAssets=all and IncludeAssets=none."
4+
ms.date: 01/03/2025
5+
ai-usage: ai-assisted
6+
---
7+
8+
# PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none
9+
10+
The [PrunePackageReference](/nuget/consume-packages/package-references-in-project-files#prunepackagereference) feature automatically removes *transitive* packages that are provided by the target platform. With this change, the feature also marks *directly* prunable `PackageReference` items with `PrivateAssets=all` and `IncludeAssets=none` attributes. These attributes prevent the packages from appearing in generated dependency lists for packages.
11+
12+
## Version introduced
13+
14+
.NET 10 Preview 7
15+
16+
## Previous behavior
17+
18+
In earlier .NET 10 previews, directly prunable `PackageReference` items might have generated an [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510) but still appeared in the generated *.nuspec* dependencies for all target frameworks, even those where the package is provided by the platform.
19+
20+
For example, consider a multi-targeting project with the following configuration:
21+
22+
```xml
23+
<PropertyGroup>
24+
<TargetFramework>net9.0;net472</TargetFramework>
25+
</PropertyGroup>
26+
27+
<ItemGroup>
28+
<PackageReference Include="System.Text.Json" Version="9.0.4" />
29+
</ItemGroup>
30+
```
31+
32+
Such a project file generated a *.nuspec* file with dependencies for both target frameworks:
33+
34+
```xml
35+
<dependencies>
36+
<group targetFramework=".NETFramework4.7.2">
37+
<dependency id="System.Text.Json" version="9.0.4" />
38+
</group>
39+
<group targetFramework="net9.0">
40+
<dependency id="System.Text.Json" version="9.0.4" />
41+
</group>
42+
</dependencies>
43+
```
44+
45+
## New behavior
46+
47+
Starting in .NET 10 Preview 7, directly prunable `PackageReference` items are automatically marked with `PrivateAssets=all` and `IncludeAssets=none`, which excludes them from the generated dependencies for target frameworks where they're provided by the platform.
48+
49+
The same project configuration now generates a *.nuspec* file with the prunable dependency removed from the target framework that provides it (.NET 9):
50+
51+
```xml
52+
<dependencies>
53+
<group targetFramework=".NETFramework4.7.2">
54+
<dependency id="System.Text.Json" version="9.0.4" />
55+
</group>
56+
<group targetFramework="net9.0">
57+
</group>
58+
</dependencies>
59+
```
60+
61+
## Type of breaking change
62+
63+
This is a [behavioral change](../../categories.md#behavioral-change).
64+
65+
## Reason for change
66+
67+
This change ensures that package dependencies accurately reflect the actual requirements for each target framework. It prevents unnecessary package references from appearing in generated packages when those APIs are already provided by the target framework.
68+
69+
## Recommended action
70+
71+
- If you create a package and get a [`NU1510` warning](/nuget/reference/errors-and-warnings/nu1510), follow the instructions there.
72+
- If you create a package and the generated *.nuspec* dependencies don't contain a referenced package for *any* target framework, remove the reference from the project file as it's not needed.
73+
- If the referenced package appears in the *.nuspec* file, no action is needed.
74+
75+
## Affected APIs
76+
77+
None.
78+
79+
## See also
80+
81+
- [PrunePackageReference](/nuget/consume-packages/package-references-in-project-files#prunepackagereference)
82+
- [NU1510 is raised for direct references pruned by NuGet](nu1510-pruned-references.md)

0 commit comments

Comments
 (0)