CONFIGURATION
TargetFramework project property
Defines the target framework for an SDK-style project. It determines the compile-time framework API contract, not the SDK version selected by global.json.
Formal Syntax & Structure
csharp syntaxcsharp
<TargetFramework>net10.0</TargetFramework>Working Example
Example Snippetcsharp
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net10.0</TargetFramework> <LangVersion>14.0</LangVersion> <Nullable>enable</Nullable> <ImplicitUsings>disable</ImplicitUsings> </PropertyGroup></Project>