target framework
The project setting, such as net10.0, that names which version of the .NET API surface your code is compiled against.
In more detail
It is a promise about which APIs you may call, not a statement about the machine you run on or the SDK you build with. A program built for net10.0 needs a 10.x runtime at startup and by default rolls forward to the newest installed patch. Choose the newest long-term support target your deployment policy allows and keep it explicit.
Example
<TargetFramework>net10.0</TargetFramework>Related terms
- project file — The XML file, such as Hello.csproj, that tells the build which SDK, target framework, packages and settings a project uses.
- roll forward — The rule by which .NET picks a newer installed version than the one requested, such as the newest 10.0.x runtime for an app built for 10.0.
- LTS — Long-term support: a release that its maintainers or vendors promise to patch with security and bug fixes for years, rather than for a short window.
- reference assemblies — Assemblies containing only the public API shape of a framework version, used by the compiler to decide which APIs your code may call.
Taught in
- What is .NET? Runtime vs SDK, and LTS vs STS — Modern .NET Core, C# & Enterprise Microservices
- The C# Language: Types, Variables, and Flow Control — Modern .NET Core, C# & Enterprise Microservices
- Solutions, Projects, and Target Frameworks — Modern .NET Core, C# & Enterprise Microservices