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.
@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?
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 aTargetPlatformVersion
. 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