I've been reviewing the code for NuGet3 on GitHub, and I see several folder patterns in https://github.com/NuGet/NuGet3/blob/a5bc907d36ddaa8d4fa6c499e50d7ebf8993ed39/src/NuGet.Client/ManagedCodeConventions.cs related to expected folder structures within a NuGet package. However, I'm having a hard time finding any examples of these - specifically the rid and tfm values.
How can I know all the possible values for rid and tfm? I know they mean Runtime Identifier and Target Framework Moniker, but I don't really know what to do with that.
The documentation that I've seen never seems to deal with the topic directly or exhaustively.
I took some time to review the docs and look at the code. Most of this answer comes from the code.
TargetFrameworkMoniker / tfm is constructed by using one of the constants from FrameworkIdentifiers in FrameworkConstants.cs . It is a framework identifier, plus a version concatenated on the end. Some examples include:
Plus others you can find in the code linked above.
For runtime identifiers, they are composed of an operating system identifier of some sort, plus an architecture. So, in JsonRuntimeFormatTests.cs you can find a few examples.
These include:
This information has helped me structure a NuGet package that uses the runtimes folder, as I was struggling to know what the possible values were. I hope it helps someone else.