Skip to content

Commit b013edb

Browse files
authored
Update docs for the default TPV for Apple platforms. (#43089)
1 parent 363ca5d commit b013edb

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

docs/standard/frameworks.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Use these guidelines to determine which TFM to use in your app:
104104

105105
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.
106106

107-
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 iOS in .NET 6 is `15.0`, which means that `net6.0-ios` is shorthand for the canonical `net6.0-ios15.0` TFM. The implied platform version for a newer base TFM may be higher, for example, a future `net8.0-ios` TFM could map to `net8.0-ios16.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.
107+
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.
108108

109109
The following table shows the default target platform values (TPV) for each .NET release.
110110

@@ -114,7 +114,18 @@ The following table shows the default target platform values (TPV) for each .NET
114114
| .NET 7 | 33.0 | 16.1 | 16.1 | 13.0 | 16.1 | 7.0 | 7.0 |
115115
| .NET 8 | 34.0 | 17.2 | 17.2 | 14.2 | 17.1 | 8.0 | 7.0 |
116116

117-
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 iOS platform added iOS 15.1 APIs in a .NET 6.0.x SDK update, you could access them by using the TFM `net6.0-ios15.1`.
117+
> [!NOTE]
118+
> On Apple platforms (iOS, macOS, tvOS, and Mac Catalyst) in .NET 8 and earlier,
119+
> the default TPV is the latest supported version in the currently installed workload.
120+
> That means that updating the iOS workload in .NET 8, for example, might result in a higher default
121+
> TPV, if support for a new version of iOS has been added in that workload. In the preceding table,
122+
> the default TPV is the one in the initial release for the stated .NET version.
123+
>
124+
> Starting in .NET 9, this special behavior only applies to executable projects.
125+
> The default TPV for library projects now stays the same for the entirety of
126+
> a major .NET release, like all other platforms.
127+
128+
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`.
118129

119130
#### Precedence
120131

0 commit comments

Comments
 (0)