目标框架目前在 NuGet 源代码中进行了硬编码。虽然NuGet 网站上记录了一些目标框架,但其中没有记录许多目标框架。因此,正如 Jeff R 已经提到的,目前查找目标框架的最佳方法是查看 NuGet 源代码。
NuGet 还为其中一些框架提供了简短的标识符(例如 wp = WindowsPhone)。
Microsoft 定义的运行时标识符可在Microsoft.NETCore.Platforms NuGet 包中找到。在这个 NuGet 包中是一个带有运行时标识符的 runtime.json 文件:
{
"runtimes": {
"base": {
},
"any": {
"#import": [ "base" ]
},
"win": {
"#import": [ "any" ]
},
"win-x86": {
"#import": [ "win" ]
},
"win-x64": {
"#import": [ "win" ]
},
"win7": {
"#import": [ "win" ]
},
"win7-x86": {
"#import": [ "win7", "win-x86" ]
},
"win7-x64": {
"#import": [ "win7", "win-x64" ]
},
"win8": {
"#import": [ "win7" ]
},
"win8-x86": {
"#import": [ "win8", "win7-x86" ]
},
"win8-x64": {
"#import": [ "win8", "win7-x64" ]
},
"win8-arm": {
"#import": [ "win8" ]
},
"win81": {
"#import": [ "win8" ]
},
"win81-x86": {
"#import": [ "win81", "win8-x86" ]
},
"win81-x64": {
"#import": [ "win81", "win8-x64" ]
},
"win81-arm": {
"#import": [ "win81", "win8-arm" ]
},
"win10": {
"#import": [ "win81" ]
},
"win10-x86": {
"#import": [ "win10", "win81-x86" ]
},
"win10-x64": {
"#import": [ "win10", "win81-x64" ]
},
"win10-arm": {
"#import": [ "win10", "win81-arm" ]
},
"aot": {
"#import": [ "any" ]
},
"win-aot": {
"#import": [ "win", "aot" ]
},
"win-x86-aot": {
"#import": [ "win-aot", "win-x86" ]
},
"win-x64-aot": {
"#import": [ "win-aot", "win-x64" ]
},
"win7-aot": {
"#import": [ "win-aot", "win7" ]
},
"win7-x86-aot": {
"#import": [ "win7-aot", "win7-x86" ]
},
"win7-x64-aot": {
"#import": [ "win7-aot", "win7-x64" ]
},
"win8-aot": {
"#import": [ "win8", "win7-aot" ]
},
"win8-x86-aot": {
"#import": [ "win8-aot", "win8-x86", "win7-x86-aot" ]
},
"win8-x64-aot": {
"#import": [ "win8-aot", "win8-x64", "win7-x64-aot" ]
},
"win8-arm-aot": {
"#import": [ "win8-aot", "win8-arm" ]
},
"win81-aot": {
"#import": [ "win81", "win8-aot" ]
},
"win81-x86-aot": {
"#import": [ "win81-aot", "win81-x86", "win8-x86-aot" ]
},
"win81-x64-aot": {
"#import": [ "win81-aot", "win81-x64", "win8-x64-aot" ]
},
"win81-arm-aot": {
"#import": [ "win81-aot", "win81-arm", "win8-arm-aot" ]
},
"win10-aot": {
"#import": [ "win10", "win81-aot" ]
},
"win10-x86-aot": {
"#import": [ "win10-aot", "win10-x86", "win81-x86-aot" ]
},
"win10-x64-aot": {
"#import": [ "win10-aot", "win10-x64", "win81-x64-aot" ]
},
"win10-arm-aot": {
"#import": [ "win10-aot", "win10-arm", "win81-arm-aot" ]
}
}
}