Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ description: Explore Microsoft's comprehensive .NET API browser. Your ultimate r
layout: ApiBrowserPage
hide_bc: true
title: .NET API browser
quickFilterColumn1: net-8.0,netframework-4.8,netstandard-2.1
quickFilterColumn2: aspnetcore-8.0,efcore-8.0,net-maui-8.0
quickFilterColumn1: net-9.0,netframework-4.8,netstandard-2.1
quickFilterColumn2: aspnetcore-9.0,efcore-8.0,net-maui-8.0
quickFilterColumn3: azure-dotnet,ml-dotnet,spark-dotnet
ms.topic: landing-page
ms.custom: "updateeachrelease"
ms.date: 11/14/2023
ms.date: 11/10/2024
---
# .NET API browser

Expand Down
10 changes: 5 additions & 5 deletions docs/csharp/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ tools:
imageSrc: /visualstudio/media/vs-ide-2022.svg
url: /visualstudio/windows
# Card
- title: Visual Studio Code
- title: Visual Studio Code
imageSrc: /visualstudio/media/vs-code-logo.svg
url: https://code.visualstudio.com/docs/csharp/get-started

Expand Down Expand Up @@ -305,7 +305,7 @@ additionalContent:
# Card
- title: ".NET API reference"
summary: API reference documentation for .NET
url: ../../api/index.md?view=net-8.0
url: ../../api/index.md?view=net-9.0
# Card
- title: ".NET Framework API reference"
summary: API reference documentation for .NET Framework
Expand All @@ -319,9 +319,9 @@ additionalContent:
summary: API reference documentation for ML.NET
url: ../../api/index.md?view=ml-dotnet&preserve-view=true
# Card
- title: ".NET Platform Extensions API reference"
summary: API reference documentation for .NET Platform Extensions
url: ../../api/index.md?view=dotnet-plat-ext-8.0&preserve-view=true
- title: ".NET Package-provided API reference"
summary: Reference documentation for package-provided .NET APIs
url: ../../api/index.md?view=dotnet-9.0-pp&preserve-view=true

# footer (Optional; Remove if not applicable.)
footer: "Are you interested in contributing to the .NET docs? For more information, see our [contributor guide](/contribute/dotnet/dotnet-contribute)."
4 changes: 3 additions & 1 deletion docs/csharp/language-reference/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ landingContent:
linkLists:
- linkListType: whats-new
links:
- text: "What's new in C# 13"
url: ../whats-new/csharp-13.md
- text: "What's new in C# 12"
url: ../whats-new/csharp-12.md
- text: "What's new in C# 11"
Expand All @@ -43,7 +45,7 @@ landingContent:
url: ../whats-new/breaking-changes.md
- text: Version compatibility
url: ../whats-new/version-update-considerations.md


- title: "Stay in touch"
linkLists:
Expand Down
4 changes: 3 additions & 1 deletion docs/fsharp/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ landingContent:
- text: "F# library reference"
url: https://fsharp.github.io/fsharp-core-docs
- text: ".NET library reference"
url: ../../api/index.md?view=net-8.0
url: ../../api/index.md?view=net-9.0

- title: "F# fundamentals"
linkLists:
Expand Down Expand Up @@ -121,6 +121,8 @@ landingContent:
linkLists:
- linkListType: whats-new
links:
- text: "What's new in F# 9"
url: whats-new/fsharp-9.md
- text: "What's new in F# 8"
url: whats-new/fsharp-8.md
- text: "What's new in F# 7"
Expand Down
16 changes: 8 additions & 8 deletions docs/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ conceptualContent:
- url: core/tutorials/index.md
itemType: tutorial
text: .NET tutorials
- url: core/whats-new/dotnet-8/overview.md
- url: core/whats-new/dotnet-9/overview.md
itemType: whats-new
text: What's new in .NET 8
text: What's new in .NET 9
- url: https://dotnetfoundation.org
itemType: overview
text: .NET Foundation
Expand Down Expand Up @@ -368,23 +368,23 @@ additionalContent:
# Card
- title: ".NET API reference"
summary: API reference documentation for .NET
url: ../api/index.md?view=net-8.0
url: ../api/index.md?view=net-9.0
# Card
- title: ".NET Framework API reference"
summary: API reference documentation for .NET Framework
url: ../api/index.md?view=netframework-4.8&preserve-view=true
# Card
- title: "ASP.NET Core API reference"
summary: API reference documentation for ASP.NET Core
url: ../api/index.md?view=view=aspnetcore-8.0&preserve-view=true
url: ../api/index.md?view=view=aspnetcore-9.0&preserve-view=true
# Card
- title: "ML.NET API reference"
summary: API reference documentation for ML.NET
url: ../api/index.md?view=ml-dotnet&preserve-view=true
# Card
- title: ".NET Platform Extensions API reference"
summary: API reference documentation for .NET Platform Extensions
url: ../api/index.md?view=dotnet-plat-ext-8.0&preserve-view=true
- title: ".NET Package-provided API reference"
summary: Reference documentation for package-provided .NET APIs
url: ../api/index.md?view=dotnet-9.0-pp&preserve-view=true
# Card
- title: "C# language reference"
summary: C# language reference and specification
Expand All @@ -399,4 +399,4 @@ additionalContent:
url: visual-basic/language-reference/index.md

# footer (optional)
footer: "Are you interested in contributing to the .NET docs? For more information, see our [contributor guide](/contribute/dotnet/dotnet-contribute)."
footer: "Are you interested in contributing to the .NET docs? For more information, see our [contributor guide](/contribute/dotnet/dotnet-contribute)."
88 changes: 46 additions & 42 deletions docs/standard/frameworks.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Target frameworks in SDK-style projects - .NET
description: Learn about target frameworks for .NET apps and libraries.
ms.date: 12/12/2023
ms.date: 11/11/2024
ms.service: dotnet
ms.custom: updateeachrelease
ms.subservice: standard-library
Expand All @@ -26,10 +26,8 @@ The following table defines the most common target frameworks, how they're refer

| Target framework | Latest <br/> stable version | Target framework moniker (TFM) | Implemented <br/> .NET Standard version |
|:----------------:|:---------------------------:|:------------------------------:|:---------------------------------------:|
| .NET 9 | 9 | net9.0 | 2.1 |
| .NET 8 | 8 | net8.0 | 2.1 |
| .NET 7 | 7 | net7.0 | 2.1 |
| .NET 6 | 6 | net6.0 | 2.1 |
| .NET 5 | 5 | net5.0 | 2.1 |
| .NET Standard | 2.1 | netstandard2.1 | N/A |
| .NET Core | 3.1 | netcoreapp3.1 | 2.1 |
| .NET Framework | 4.8.1 | net481 | 2.0 |
Expand All @@ -53,52 +51,59 @@ A target framework is typically referenced by a TFM. The following table shows t

### .NET 5+ OS-specific TFMs

The `net5.0`, `net6.0`, `net7.0`, and `net8.0` TFMs include technologies that work across different platforms. Specifying an *OS-specific TFM* makes APIs that are specific to an operating system available to your app, for example, Windows Forms or iOS bindings. OS-specific TFMs also inherit every API available to their base TFM, for example, the `net6.0` TFM.
The `net5.0`, `net6.0`, `net7.0`, `net8.0`, and `net.0` TFMs include technologies that work across different platforms. Specifying an *OS-specific TFM* makes APIs that are specific to an operating system available to your app, for example, Windows Forms or iOS bindings. OS-specific TFMs also inherit every API available to their base TFM, for example, the `net9.0` TFM.

.NET 5 introduced the `net5.0-windows` OS-specific TFM, which includes Windows-specific bindings for WinForms, WPF, and UWP APIs. .NET 6 and later versions have additional OS-specific TFMs, for example, `net6.0-ios`.

The following table shows the compatibility of the .NET 5+ TFMs.

| TFM | Compatible with |
|--------------------|-------------------------------------------------------------------------------------------------------------------------|
| TFM | Compatible with |
|----------------------|------------------------------------------------------------------|
| `net5.0` | net1..4 (with NU1701 warning)<br />netcoreapp1..3.1 (warning when WinForms or WPF is referenced)<br />netstandard1..2.1 |
| `net5.0-windows` | netcoreapp1..3.1 (plus everything else inherited from `net5.0`) |
| `net6.0` | (Subsequent version of `net5.0`) |
| `net6.0-android` | `xamarin.android` (plus everything else inherited from `net6.0`) |
| `net6.0-ios` | Everything inherited from `net6.0` |
| `net6.0-maccatalyst` | Everything inherited from `net6.0` |
| `net6.0-macos` | Everything inherited from `net6.0` |
| `net6.0-tvos` | Everything inherited from `net6.0` |
| `net6.0-windows` | (Subsequent version of `net5.0-windows`) |
| `net7.0` | (Subsequent version of `net6.0`) |
| `net7.0-android` | (Subsequent version of `net6.0-android`) |
| `net7.0-ios` | (Subsequent version of `net6.0-ios`) |
| `net7.0-maccatalyst` | (Subsequent version of `net6.0-maccatalyst`) |
| `net7.0-macos` | (Subsequent version of `net6.0-macos`) |
| `net7.0-tizen` | `tizen40` (plus everything else inherited from `net7.0`) |
| `net7.0-tvos` | (Subsequent version of `net6.0-tvos`) |
| `net7.0-windows` | (Subsequent version of `net6.0-windows`) |
| `net8.0` | (Subsequent version of `net7.0`) |
| `net8.0-android` | (Subsequent version of `net7.0-android`) |
| `net8.0-browser` | Everything inherited from `net8.0` |
| `net8.0-ios` | (Subsequent version of `net7.0-ios`) |
| `net8.0-maccatalyst` | (Subsequent version of `net7.0-maccatalyst`) |
| `net8.0-macos` | (Subsequent version of `net7.0-macos`) |
| `net8.0-tizen` | (Subsequent version of `net7.0-tizen`) |
| `net8.0-tvos` | (Subsequent version of `net7.0-tvos`) |
| `net8.0-windows` | (Subsequent version of `net7.0-windows`) |
| `net5.0-windows` | netcoreapp1..3.1 (plus everything else inherited from `net5.0`) |
| `net6.0` | (Subsequent version of `net5.0`) |
| `net6.0-android` | `xamarin.android` (plus everything else inherited from `net6.0`) |
| `net6.0-ios` | Everything inherited from `net6.0` |
| `net6.0-maccatalyst` | Everything inherited from `net6.0` |
| `net6.0-macos` | Everything inherited from `net6.0` |
| `net6.0-tvos` | Everything inherited from `net6.0` |
| `net6.0-windows` | (Subsequent version of `net5.0-windows`) |
| `net7.0` | (Subsequent version of `net6.0`) |
| `net7.0-android` | (Subsequent version of `net6.0-android`) |
| `net7.0-ios` | (Subsequent version of `net6.0-ios`) |
| `net7.0-maccatalyst` | (Subsequent version of `net6.0-maccatalyst`) |
| `net7.0-macos` | (Subsequent version of `net6.0-macos`) |
| `net7.0-tizen` | `tizen40` (plus everything else inherited from `net7.0`) |
| `net7.0-tvos` | (Subsequent version of `net6.0-tvos`) |
| `net7.0-windows` | (Subsequent version of `net6.0-windows`) |
| `net8.0` | (Subsequent version of `net7.0`) |
| `net8.0-android` | (Subsequent version of `net7.0-android`) |
| `net8.0-browser` | Everything inherited from `net8.0` |
| `net8.0-ios` | (Subsequent version of `net7.0-ios`) |
| `net8.0-maccatalyst` | (Subsequent version of `net7.0-maccatalyst`) |
| `net8.0-macos` | (Subsequent version of `net7.0-macos`) |
| `net8.0-tizen` | (Subsequent version of `net7.0-tizen`) |
| `net8.0-tvos` | (Subsequent version of `net7.0-tvos`) |
| `net8.0-windows` | (Subsequent version of `net7.0-windows`) |
| `net9.0` | (Subsequent version of `net8.0`) |
| `net9.0-android` | (Subsequent version of `net8.0-android`) |
| `net9.0-browser` | (Subsequent version of `net8.0-browser`) |
| `net9.0-ios` | (Subsequent version of `net8.0-ios`) |
| `net9.0-maccatalyst` | (Subsequent version of `net8.0-maccatalyst`) |
| `net9.0-macos` | (Subsequent version of `net8.0-macos`) |
| `net9.0-tizen` | (Subsequent version of `net8.0-tizen`) |
| `net9.0-tvos` | (Subsequent version of `net8.0-tvos`) |
| `net9.0-windows` | (Subsequent version of `net8.0-windows`) |

To make your app portable across different platforms but still have access to OS-specific APIs, you can target multiple OS-specific TFMs and add platform guards around OS-specific API calls using `#if` preprocessor directives. For a list of the available symbols, see [Preprocessor symbols](#preprocessor-symbols).

#### Suggested targets

Use these guidelines to determine which TFM to use in your app:

- Apps that are portable to multiple platforms should target a base TFM, for example, `net8.0`. This includes most libraries but also ASP.NET Core and Entity Framework.

- Platform-specific libraries should target platform-specific flavors. For example, WinForms and WPF projects should target `net8.0-windows`.

- Cross-platform application models (Xamarin Forms, ASP.NET Core) and bridge packs (Xamarin Essentials) should at least target the base TFM, for example, `net8.0`, but might also target additional platform-specific flavors to light-up more APIs or features.
- Apps that are portable to multiple platforms should target a base TFM, for example, `net9.0`. This includes most libraries but also ASP.NET Core and Entity Framework.
- Platform-specific libraries should target platform-specific flavors. For example, WinForms and WPF projects should target `net9.0-windows`.
- Cross-platform application models (Xamarin Forms, ASP.NET Core) and bridge packs (Xamarin Essentials) should at least target the base TFM, for example, `net9.0`, but might also target additional platform-specific flavors to light-up more APIs or features.

#### OS version in TFMs

Expand All @@ -110,9 +115,8 @@ The following table shows the default target platform values (TPV) for each .NET

| .NET version | Android | iOS | Mac Catalyst | macOS | tvOS | Tizen | Windows |
|--------------|--------:|-----:|-------------:|------:|-----:|------:|--------:|
| .NET 6 | 31.0 | 15.0 | 15.0 | 12.0 | 15.1 | - | 7.0 |
| .NET 7 | 33.0 | 16.1 | 16.1 | 13.0 | 16.1 | 7.0 | 7.0 |
| .NET 8 | 34.0 | 17.2 | 17.2 | 14.2 | 17.1 | 8.0 | 7.0 |
| .NET 8 | 34.0 | 17.2 | 17.2 | 14.2 | 17.1 | 7.0 | 10.0 |
| .NET 9 | 35.0 | 18.0 | 18.0 | 15.0 | | 7.0 | 10.0 |

> [!NOTE]
> On Apple platforms (iOS, macOS, tvOS, and Mac Catalyst) in .NET 8 and earlier,
Expand Down Expand Up @@ -155,14 +159,14 @@ Here is an example excerpt of a project file that uses the `TargetFramework` and

## How to specify a target framework

Target frameworks are specified in a project file. When a single target framework is specified, use the [TargetFramework element](../core/project-sdk/msbuild-props.md#targetframework). The following console app project file demonstrates how to target .NET 8:
Target frameworks are specified in a project file. When a single target framework is specified, use the [TargetFramework element](../core/project-sdk/msbuild-props.md#targetframework). The following console app project file demonstrates how to target .NET 9:

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

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

</Project>
Expand Down
4 changes: 2 additions & 2 deletions docs/standard/library-guidance/cross-platform-targeting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Cross-platform targeting for .NET libraries
description: Best practice recommendations for creating cross-platform .NET libraries.
ms.date: 11/14/2023
ms.date: 11/11/2024
---

# Cross-platform targeting
Expand Down Expand Up @@ -33,7 +33,7 @@ If your project targets .NET or .NET Standard and compiles successfully, it does

✔️ DO include a `net6.0` target or later if you require new APIs introduced in a modern .NET.

> .NET 6 and later apps can use a `netstandard2.0` target, so `net6.0` isn't required. You should explicitly target `net6.0`, `net7.0`, or `net8.0` when you want to use newer .NET APIs.
> .NET 6 and later apps can use a `netstandard2.0` target, so `net6.0` isn't required. You should explicitly target `net6.0`, `net7.0`, `net8.0`, or `net9.0` when you want to use newer .NET APIs.

❌ AVOID including a `netstandard1.x` target.

Expand Down
Loading
Loading