Skip to content

Commit 7d55cef

Browse files
authored
add more info about TPVs (#45657)
1 parent 1d1e896 commit 7d55cef

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

docs/standard/frameworks.md

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Target frameworks in SDK-style projects - .NET
33
description: Learn about target frameworks for .NET apps and libraries.
4-
ms.date: 11/11/2024
4+
ms.date: 04/07/2025
55
ms.service: dotnet
66
ms.custom: updateeachrelease
77
ms.subservice: standard-library
@@ -109,27 +109,27 @@ Use these guidelines to determine which TFM to use in your app:
109109

110110
You can also specify an optional OS version at the end of an OS-specific TFM, for example, `net6.0-ios15.0`. The version indicates which APIs are available to your app or library. It doesn't control the OS version that your app or library supports at run time. It's used to select the reference assemblies that your project compiles against, and to select assets from NuGet packages. Think of this version as the "platform version" or "OS API version" to disambiguate it from the run-time OS version.
111111

112-
When an OS-specific TFM doesn't specify the platform version explicitly, it has an implied value that can be inferred from the base TFM and platform name. For example, the default platform value for Android in .NET 6 is `31.0`, which means that `net6.0-android` is shorthand for the canonical `net6.0-android31.0` TFM. The implied platform version for a newer base TFM may be higher, for example, a future `net8.0-android` TFM could map to `net8.0-android34.0`. The shorthand form is intended for use in project files only, and is expanded to the canonical form by the .NET SDK's MSBuild targets before being passed to other tools, such as NuGet.
112+
The .NET SDK is designed to be able to support newly released APIs for an individual platform without a new version of the base TFM. This enables you to access platform-specific functionality without waiting for a major release of .NET. You can gain access to these newly released APIs by incrementing the platform version in the TFM. For example, if the Android platform added API level 32 APIs in a .NET 6.0.x SDK update, you could access them by using the TFM `net6.0-android32.0`.
113+
114+
When an OS-specific TFM doesn't specify the platform version explicitly, it has an implied value that can be inferred from the base TFM and platform name. For example, the default platform version for Android in .NET 9 is `35.0`, which means that `net9.0-android` is shorthand for the canonical `netp.0-android35.0` TFM. The shorthand form is intended for use in project files only, and is expanded to the canonical form by the .NET SDK's MSBuild targets before being passed to other tools, such as NuGet.
113115

114-
The following table shows the default target platform values (TPV) for each .NET release.
116+
The following table shows the *default* target platform version (TPV) for each .NET release. **If you want to use the latest bindings, use the default (that is, don't specify an OS version).**
115117

116118
| .NET version | Android | iOS | Mac Catalyst | macOS | tvOS | Tizen | Windows |
117119
|--------------|--------:|-----:|-------------:|------:|-----:|------:|--------:|
118-
| .NET 8 | 34.0 | 17.2 | 17.2 | 14.2 | 17.1 | 10.0 | 10.0 |
119-
| .NET 9 | 35.0 | 18.0 | 18.0 | 15.0 | | 10.0 | 10.0 |
120+
| .NET 8 | 34.0 | 17.2 | 17.2 | 14.2 | 17.1 | 10.0 | 7.0 |
121+
| .NET 9 | 35.0 | 18.0 | 18.0 | 15.0 | | 10.0 | 7.0 |
122+
123+
Starting in .NET 9, when service releases introduce support for a later TPV (which will always have the same *major* version number as when the .NET version was initially released), the earliest supported TPV for that .NET version will remain supported. For example, for .NET 9, the earliest supported iOS version, 18.0, will remain supported, even when a service release adds support for the latest iOS 18.x version. **If you need to use the earliest bindings for a .NET release, use a specific OS version number in your TFM.**
120124

121125
> [!NOTE]
122126
> On Apple platforms (iOS, macOS, tvOS, and Mac Catalyst) in .NET 8 and earlier,
123127
> the default TPV is the latest supported version in the currently installed workload.
124128
> That means that updating the iOS workload in .NET 8, for example, might result in a higher default
125129
> TPV, if support for a new version of iOS has been added in that workload. In the preceding table,
126-
> the default TPV is the one in the initial release for the stated .NET version.
130+
> the default TPV is the version in the initial release for the stated .NET version.
127131
>
128-
> Starting in .NET 9, this special behavior only applies to executable projects.
129-
> The default TPV for library projects now stays the same for the entirety of
130-
> a major .NET release, like all other platforms.
131-
132-
The .NET SDK is designed to be able to support newly released APIs for an individual platform without a new version of the base TFM. This enables you to access platform-specific functionality without waiting for a major release of .NET. You can gain access to these newly released APIs by incrementing the platform version in the TFM. For example, if the Android platform added API level 32 APIs in a .NET 6.0.x SDK update, you could access them by using the TFM `net6.0-android32.0`.
132+
> Starting in .NET 9, this special behavior only applies to *executable* projects. The default TPV for library projects now stays the same for the entirety of a major .NET release, like all other platforms.
133133
134134
#### Precedence
135135

@@ -243,10 +243,6 @@ The following target frameworks are deprecated. Packages that target these targe
243243
## See also
244244

245245
- [Target framework names in .NET 5](https://github.com/dotnet/designs/blob/main/accepted/2020/net5/net5.md)
246-
- [Call Windows Runtime APIs in desktop apps](/windows/apps/desktop/modernize/desktop-to-uwp-enhance)
247-
- [Developing Libraries with Cross Platform Tools](../core/tutorials/libraries.md)
248246
- [.NET Standard](net-standard.md)
249-
- [.NET Core Versioning](../core/versions/index.md)
250-
- [NuGet Tools GitHub Repository](https://github.com/joelverhagen/NuGetTools)
251-
- [Framework Profiles in .NET](https://blog.stephencleary.com/2012/05/framework-profiles-in-net.html)
252-
- [Platform compatibility analyzer](analyzers/platform-compat-analyzer.md)
247+
- [.NET versioning](../core/versions/index.md)
248+
- [Windows 11 release information](/windows/release-health/windows11-release-information)

0 commit comments

Comments
 (0)