dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.26k stars 5.89k forks source link

Document the TargetPlatformMoniker for .NET 5 era frameworks #35845

Open nkolev92 opened 1 year ago

nkolev92 commented 1 year ago

For a framework with a platform such as android/windows/linux, there are 2 parts.

TargetFrameworkMoniker, usually denoting the netX.Y part, ex. .NETCoreApp,Version=7.0 TargetPlatformMoniker, usually denoting the PlatformNameA.B ex. Windows=Version=7.0

If you create a project for say android such as net7.0-android, the .NET SDK would automatically add a TargetPlatformVersion. That is something that is known by the SDK only at build time.

I couldn't find anything documenting this logic, or anything correlating platform version with which version of the SDK is supported for example or something explaining the meaning of the platform versions.

https://github.com/NuGet/docs.microsoft.com-nuget/issues/3076 is relevant. NuGet simply doesn't know the available framework.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.


Associated WorkItem - 156746

gewarren commented 1 year ago

@baronfel Can you help me with this one and explain how the SDK chooses a target platform version for an OS-specific TFM for commands like dotnet pack?