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
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`.
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)
| 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> |
53
53
| 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>|
55
55
| 8.0.3xx | 17.10 | May '24 | TBD |
56
56
| 8.0.4xx | 17.11 | Aug '24 | Nov '25<sup>2</sup> |
57
57
| 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
65
65
>
66
66
> <sup>2</sup> .4xx .NET SDK feature bands are supported for the life of the matching runtime as stand-alone installs.
67
67
>
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).
69
69
>
70
70
> [Visual Studio 2019 Lifecycle](/lifecycle/products/visual-studio-2019)
71
71
>
72
72
> [Visual Studio 2022 Lifecycle](/lifecycle/products/visual-studio-2022)
73
73
74
74
## Targeting and support rules
75
75
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:
77
77
78
78
- Each new TargetFramework **requires** a new Visual Studio version or a new `dotnet` version.
79
79
- 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
95
95
| 9.0.100 | 17.12 | 17.11 | Net8.0 | Net9.0 |
96
96
97
97
> [!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—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—that is, the minimum required version of Visual Studio for .NET SDK 6.0.100 or 6.0.200 remains 16.10.
99
99
100
100
> <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).
101
101
102
102
To ensure consistent tooling, you should use `dotnet build` rather than `msbuild` to build your application when possible.
103
103
104
104
## Preview versioning
105
105
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.
107
107
108
108
| SDK preview version | Visual Studio version |
109
109
|---------------------|-----------------------|
@@ -116,6 +116,7 @@ Major versions of the .NET SDK are typically released within a few days of a Vis
Copy file name to clipboardExpand all lines: docs/core/tools/sdk-errors/netsdk1138.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
@@ -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.
16
16
17
17
To resolve this error, change your project to target a supported version of .NET.
18
18
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:
0 commit comments