Skip to content

Commit e7999d4

Browse files
authored
sdk breaking changes (#43371)
1 parent 6d02d4a commit e7999d4

File tree

7 files changed

+133
-15
lines changed

7 files changed

+133
-15
lines changed

docs/core/compatibility/9.0.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff
9999
| [`dotnet workload` commands output change](sdk/9.0/dotnet-workload-output.md) | Behavioral change | Preview 1 |
100100
| [`installer` repo version no longer documented](sdk/9.0/productcommits-versions.md) | Behavioral change | Preview 5 |
101101
| [Terminal logger is default](sdk/9.0/terminal-logger.md) | Behavioral change | Preview 1 |
102-
| [Warning emitted for .NET Standard 1.x](sdk/9.0/netstandard-warning.md) | Source incompatible | Preview 6 |
102+
| [Version requirements for .NET 9 SDK](sdk/9.0/version-requirements.md) | Source incompatible | GA |
103+
| [Warning emitted for .NET Standard 1.x target](sdk/9.0/netstandard-warning.md) | Source incompatible | Preview 6 |
104+
| [Warning emitted for .NET 7 target](sdk/9.0/net70-warning.md) | Source incompatible | GA |
103105

104106
## Serialization
105107

106-
| Title | Type of change | Introduced version |
107-
|-----------------------------------------------------------------------------|-------------------|--------------------|
108+
| Title | Type of change | Introduced version |
109+
|-------------------------------------------------------------------------------|-------------------|--------------------|
108110
| [BinaryFormatter always throws](serialization/9.0/binaryformatter-removal.md) | Behavioral change | Preview 6 |
109111

110112
## Windows Forms

docs/core/compatibility/sdk/8.0/version-requirements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This change can affect [source compatibility](../../categories.md#source-compati
3939

4040
## Reason for change
4141

42-
This is our standard support policy for the SDK as we can't support all prior versions of Visual Studio and MSBuild.
42+
This is part of the standard support policy for the SDK as not all prior versions of Visual Studio and MSBuild can be supported.
4343

4444
## Recommended action
4545

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: "Breaking change: Warning emitted when targeting net7.0"
3+
description: Learn about the breaking change in the .NET SDK where a warning is issued for apps that target net7.0, which is out of support.
4+
ms.date: 11/6/2024
5+
---
6+
7+
# Warning emitted when targeting net7.0
8+
9+
Starting with the November 2024 releases of the .NET 8 and 9 SDKs, warning [NETSDK1138](../../../tools/sdk-errors/netsdk1138.md) is issued if your app targets `net7.0`. .NET 7 is now out of support.
10+
11+
When a version of .NET goes out of support, it's marked as such in Visual Studio the following month. The .NET SDK waits 6 months before adding a warning.
12+
13+
This change applies to .NET 8.0.111, 8.0.307, 8.0.404, and 9.0.100.
14+
15+
## Version introduced
16+
17+
.NET 9 GA
18+
19+
## Previous behavior
20+
21+
Previously, apps could target `net7.0` without a warning, even though it was out of support.
22+
23+
## New behavior
24+
25+
Starting in .NET 9 and the other [affected versions](#version-introduced), the following warning is issued at compile time for apps that target `net7.0`:
26+
27+
> warning NETSDK1138: The target framework 'net7.0' is out of support
28+
29+
## Type of breaking change
30+
31+
This change can affect [source compatibility](../../categories.md#source-compatibility).
32+
33+
## Reason for change
34+
35+
This is a planned change to ensure that customers are aware that they're targeting an unsupported framework version.
36+
37+
## Recommended action
38+
39+
Upgrade your app to target `net8.0`.
40+
41+
If you must continue targeting `net7.0`, you can set the MSBuild property `CheckEolTargetFramework` to `false`. You can set it in the project file or by passing `/p:CheckEolTargetFramework=false` to a .NET CLI command such as `dotnet build`.
42+
43+
Example *.csproj* or *.vbproj* file:
44+
45+
```xml
46+
<Project Sdk="Microsoft.NET.Sdk">
47+
<PropertyGroup>
48+
...
49+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
50+
</PropertyGroup>
51+
</Project>
52+
```
53+
54+
## Affected APIs
55+
56+
None.
57+
58+
## See also
59+
60+
- [NETSDK1138: The target framework is out of support](../../../tools/sdk-errors/netsdk1138.md)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: "Breaking change: Version requirements for .NET 9 SDK"
3+
description: Learn about the breaking change in the .NET 9 SDK where specific versions of Visual Studio and MSBuild are required.
4+
ms.date: 11/06/2024
5+
---
6+
# Version requirements for .NET 9 SDK
7+
8+
Per the [published support rules](../../../porting/versioning-sdk-msbuild-vs.md#targeting-and-support-rules), the minimum Visual Studio and MSBuild version for each new major release is updated with a one quarter delay. For the .NET 9 release:
9+
10+
- 9.0.100 requires version 17.11 to target `net8.0` and earlier frameworks.
11+
- 9.0.100 requires version 17.12 or later to target `net9.0`.
12+
13+
## Version introduced
14+
15+
.NET 9 GA
16+
17+
## Previous behavior
18+
19+
Previously, you could load .NET 9.0.100 on earlier Visual Studio versions. In addition, there was no warning when targeting `net9.0` in Visual Studio version 17.11.
20+
21+
## New behavior
22+
23+
- .NET 9.0.100 won't load in Visual Studio version 17.10 or earlier.
24+
- Visual Studio version 17.11 doesn't make `net9.0` available in the project properties.
25+
- .NET 9.0.100 warns when targeting `net9.0` and using Visual Studio version 17.11:
26+
27+
> NETSDK1223: Targeting .NET 9.0 or higher in Visual Studio 2022 17.11 is not supported.
28+
29+
## Type of breaking change
30+
31+
This change can affect [source compatibility](../../categories.md#source-compatibility).
32+
33+
## Reason for change
34+
35+
This is part of the standard support policy for the SDK as not all prior versions of Visual Studio and MSBuild can be supported.
36+
37+
## Recommended action
38+
39+
Upgrade your Visual Studio version to the required version.
40+
41+
## Affected APIs
42+
43+
N/A
44+
45+
## See also
46+
47+
- [Targeting and support rules](../../../porting/versioning-sdk-msbuild-vs.md#targeting-and-support-rules)

docs/core/compatibility/toc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ items:
102102
href: sdk/9.0/productcommits-versions.md
103103
- name: Terminal logger is default
104104
href: sdk/9.0/terminal-logger.md
105+
- name: Version requirements
106+
href: sdk/9.0/version-requirements.md
105107
- name: Warning emitted for .NET Standard 1.x targets
106108
href: sdk/9.0/netstandard-warning.md
109+
- name: Warning emitted for .NET 7 target
110+
href: sdk/9.0/net70-warning.md
107111
- name: Serialization
108112
items:
109113
- name: BinaryFormatter always throws
@@ -1780,8 +1784,12 @@ items:
17801784
href: sdk/9.0/productcommits-versions.md
17811785
- name: Terminal logger is default
17821786
href: sdk/9.0/terminal-logger.md
1787+
- name: Version requirements for .NET 9 SDK
1788+
href: sdk/9.0/version-requirements.md
17831789
- name: Warning emitted for .NET Standard 1.x targets
17841790
href: sdk/9.0/netstandard-warning.md
1791+
- name: Warning emitted for .NET 7 target
1792+
href: sdk/9.0/net70-warning.md
17851793
- name: .NET 8
17861794
items:
17871795
- name: CLI console output uses UTF-8

docs/core/porting/versioning-sdk-msbuild-vs.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about the versioning relationship between the .NET SDK and MS
44
author: StephenBonikowsky
55
ms.author: stebon
66
ms.custom: updateeachrelease
7-
ms.date: 11/15/2023
7+
ms.date: 11/06/2024
88
---
99
# .NET SDK, MSBuild, and Visual Studio versioning
1010

@@ -34,6 +34,10 @@ The support timeframe for the SDK typically matches that of the Visual Studio ve
3434
| 5.0.2xx | 16.9 | March '21 | May '22 |
3535
| 5.0.3xx | 16.10 | May '21 | Aug '21 |
3636
| 5.0.4xx | 16.11 | Aug '21 | May '22 |
37+
| 6.0.1xx | 17.0 | Nov '21 | Nov '24 |
38+
| 6.0.2xx | 17.1 | Feb '22 | May '22 |
39+
| 6.0.3xx | 17.2<sup>3</sup> | May '22 | Oct '23 |
40+
| 6.0.4xx | 17.3 | Aug '22 | Nov '24 |
3741
| 7.0.1xx | 17.4 | Nov '22 | May '24 |
3842
| 7.0.2xx | 17.5<sup>3</sup> | Feb '23 | May '23 |
3943
| 7.0.3xx | 17.6 | May '23 | May '24 |
@@ -46,12 +50,8 @@ The support timeframe for the SDK typically matches that of the Visual Studio ve
4650

4751
| SDK version | MSBuild/Visual Studio version | Ship date | Lifecycle |
4852
|-------------|-------------------------------|-----------|---------------------|
49-
| 6.0.1xx | 17.0 | Nov '21 | Nov '24<sup>1</sup> |
50-
| 6.0.2xx | 17.1 | Feb '22 | May '22 |
51-
| 6.0.3xx | 17.2<sup>3</sup> | May '22 | Oct '23 |
52-
| 6.0.4xx | 17.3 | Aug '22 | Nov '24<sup>2</sup> |
5353
| 8.0.1xx | 17.8 | Nov '23 | Nov '25<sup>1</sup> |
54-
| 8.0.2xx | 17.9<sup>3</sup> | Feb '24 | May '24 |
54+
| 8.0.2xx | 17.9<sup>3</sup> | Feb '24 | May '24<sup>3</sup> |
5555
| 8.0.3xx | 17.10 | May '24 | TBD |
5656
| 8.0.4xx | 17.11 | Aug '24 | Nov '25<sup>2</sup> |
5757
| 9.0.1xx | 17.12 | Nov '24 | May '26<sup>1</sup> |
@@ -65,15 +65,15 @@ The support timeframe for the SDK typically matches that of the Visual Studio ve
6565
>
6666
> <sup>2</sup> .4xx .NET SDK feature bands are supported for the life of the matching runtime as stand-alone installs.
6767
>
68-
> <sup>3</sup> 6.0.300, 7.0.200, and 8.0.200 require newer Visual Studio versions. For more information, see the [support rules](#targeting-and-support-rules).
68+
> <sup>3</sup> 8.0.200 requires a newer Visual Studio version. For more information, see the [support rules](#targeting-and-support-rules).
6969
>
7070
> [Visual Studio 2019 Lifecycle](/lifecycle/products/visual-studio-2019)
7171
>
7272
> [Visual Studio 2022 Lifecycle](/lifecycle/products/visual-studio-2022)
7373
7474
## Targeting and support rules
7575

76-
Starting with .NET SDK 7.0.100 and .NET SDK 6.0.300, a policy has been put into place regarding which versions of MSBuild and Visual Studio a given version of the .NET SDK will run in. The policy is:
76+
A the following policy dictates which versions of MSBuild and Visual Studio a given version of the .NET SDK will run in:
7777

7878
- Each new TargetFramework **requires** a new Visual Studio version or a new `dotnet` version.
7979
- The first version of Visual Studio that supports a new TargetFramework becomes a floor for the feature bands of that SDK for Roslyn API surface, MSBuild targets, source generators, analyzers, and so on.
@@ -95,15 +95,15 @@ Starting with .NET SDK 7.0.100 and .NET SDK 6.0.300, a policy has been put into
9595
| 9.0.100 | 17.12 | 17.11 | Net8.0 | Net9.0 |
9696

9797
> [!NOTE]
98-
> The table depicts how these versioning rules will be applied going forward, starting with .NET SDK 7.0.100 and .NET SDK 6.0.300. It also depicts how the policy would have applied to previously shipped versions of the .NET SDK, had it been in place then. However, the requirements for previous versions of the SDK don't change&mdash;that is, the minimum required version of Visual Studio for .NET SDK 6.0.100 or 6.0.200 remains 16.10.
98+
> The table depicts how these versioning rules are applied, starting with .NET SDK 7.0.100 and .NET SDK 6.0.300. It also depicts how the policy would have applied to previously shipped versions of the .NET SDK, had it been in place then. However, the requirements for previous versions of the SDK don't change&mdash;that is, the minimum required version of Visual Studio for .NET SDK 6.0.100 or 6.0.200 remains 16.10.
9999
100100
> <sup>1</sup> A breaking change in 7.0.300 for Blazor and Razor development requires Visual Studio version 17.6 or newer. For more information, see [dotnet/razor issue 8718](https://github.com/dotnet/razor/issues/8718).
101101
102102
To ensure consistent tooling, you should use `dotnet build` rather than `msbuild` to build your application when possible.
103103

104104
## Preview versioning
105105

106-
Major versions of the .NET SDK are typically released within a few days of a Visual Studio preview version. While there may be other combinations that work, only the latest preview released is tested and officially supported. The following table shows which version of Visual Studio each .NET preview version was tested with prior to release.
106+
Major versions of the .NET SDK are typically released within a few days of a Visual Studio preview version. While there might be other combinations that work, only the latest preview released is tested and officially supported. The following table shows which version of Visual Studio each .NET preview version was tested with prior to release.
107107

108108
| SDK preview version | Visual Studio version |
109109
|---------------------|-----------------------|
@@ -116,6 +116,7 @@ Major versions of the .NET SDK are typically released within a few days of a Vis
116116
| 9.0.100 Preview 7 | 17.12 Preview 1 |
117117
| 9.0.100 RC 1 | 17.12 Preview 2 |
118118
| 9.0.100 RC 2 | 17.12 Preview 3 |
119+
| 9.0.100 GA | 17.12 GA |
119120

120121
## Reference
121122

docs/core/tools/sdk-errors/netsdk1138.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Out-of-support versions include 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, and 5.0.
1616

1717
To resolve this error, change your project to target a supported version of .NET.
1818

19-
If you want to suppress the message without targeting a later framework, set the MSBuild property `CheckEolTargetFramework` to false. You can set it in the project file or by passing `/p:CheckEolTargetFramework=false` to a .NET CLI command, such as `dotnet build`. Here's an example project file:
19+
If you want to suppress the message without targeting a later framework, set the MSBuild property `CheckEolTargetFramework` to `false`. You can set it in the project file or by passing `/p:CheckEolTargetFramework=false` to a .NET CLI command, such as `dotnet build`. Here's an example project file:
2020

2121
```xml
2222
<Project Sdk="Microsoft.NET.Sdk">

0 commit comments

Comments
 (0)