转载至:https://docs.microsoft.com/zh-cn/dotnet/articles/core/rid-catalog

What are RIDs?

RID is short for Runtime IDentifier. RIDs are used to identify target operating systems where an application or asset (that is, assembly) will run. They look like this: "ubuntu.14.04-x64", "win7-x64", "osx.10.11-x64". For the packages with native dependencies, it will designate on which platforms the package can be restored.

It is important to note that RIDs are really opaque strings. This means that they have to match exactly for operations using them to work. As an example, let us consider the case of Elementary OS, which is a straightforward clone of Ubuntu 14.04. Although .NET Core and CLI work on top of that version of Ubuntu, if you try to use them on Elementary OS without any modifications, the restore operation for any package will fail. This is because we currently (May 3rd, 2016) don't have a RID that designates Elementary OS as a platform.

RIDs that represent concrete operating systems should be of the form: [os].[version]-[arch]where:

  • [os] is the operating system moniker, for example, win
  • [version] is the operating system version in the form of a dot (.) separated version number, for example, 10.1511, accurate enough to reasonably enable assets to target operating system platform APIs represented by that version.[arch] is the processor architecture, for example, x86x64armarm64, etc.
    • This shouldn't be marketing versions, as they often represent multiple discrete versions of the operating system with varying platform API surface area, for example, win.10-x64

The RID graph is defined in a package called Microsoft.NETCore.Platforms in a file calledruntime.json which you can see on the CoreFX repo. If you use this file, you will notice that some of the RIDs have an "#import" statement in them. These statements are compatibility statements. That means that a RID that has an imported RID in it, can be a target for restoring packages for that RID. Slightly confusing, but let's look at an example. Let's take a look at macOS:

"osx.10.11-x64": {
"#import": [ "osx.10.11", "osx.10.10-x64" ]
}

The above RID specifies that osx.10.11-x64 imports osx.10.10-x64. This means that when restoring packages, NuGet will be able to restore packages that specify that they need osx.10.10-x64 on osx.10.11-x64.

A slightly bigger example RID graph:

  • win.10.1511-x64

    • win.10.1511
    • win.10-x64
      • win.10
      • win.6.3.9200-x64
        • win.6.3-x64
        • win.6.3
        • win.6.3.9200
        • win.6.2.9200-x64
          • win.6.2.9200
          • win.6.1.7600-x64
            • win.6.1.7600
            • win.6.1-x64
              • win.6.1

                • win

                  • any

All RIDs eventually map back to the root any RID.

Although they look easy enough to use, there are some special things about RIDs that you have to keep in mind when working with them:

  • They are opaque strings and should be treated as black boxesYou need to use the RIDs that are already defined for the platform and this document shows that

    • You should not construct RIDs programmatically
  • The RIDs do need to be specific so don't assume anything from the actual RID value; please consult this document to determine which RID(s) you need for a given platform

Using RIDs

In order to use RIDs, you have to know which RIDs there are. This document lists out the currently supported RIDs in .NET Core. Please be aware that this document is getting updated regularly as new RIDs are added to the platform. If you wish to check if new ones are added, please check back here.

We are working towards getting this information into a more interactive form. When that happens, this page will be updated to point to that tool and/or its usage documentation.

Windows RIDs

  • Windows 7

    • win7-x64
    • win7-x86
  • Windows 8
    • win8-x64
    • win8-x86
  • Windows 10
    • win10-x64
    • win10-x86

Linux RIDs

  • Red Hat Enterprise Linux

    • rhel.7.0-x64
    • rhel.7.1-x64
    • rhel.7.2-x64
  • Ubuntu
    • ubuntu.14.04-x64
    • ubuntu.14.10-x64
    • ubuntu.15.04-x64
  • CentOS
    • centos.7-x64
    • centos.7.1-x64
  • Debian
    • debian.8-x64
    • debian.8.2-x64
  • Currently supported Ubuntu derivatives
    • linuxmint.17-x64
    • linuxmint.17.1-x64
    • linuxmint.17.2-x64
    • linuxmint.17.3-x64

OS X RIDs

  • osx.10.10-x64
  • osx.10.11-x64

.NET Core Runtime IDentifier (RID) catalog的更多相关文章

  1. .NET Core开发日志——Runtime IDentifier

    .NET Core对于传统.NET开发人员而言是既熟悉又陌生的新平台,所以有时遇上出乎意料的事情也纯属正常情况.这时只需点耐心,多查查资料,努力找到原因,也未尝不是件有意义的体验. 比如当建完一个最简 ...

  2. myeclipse 无法启动 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).

    把myeclipse10 按照目录完整拷贝到了另外一台电脑, 另外的目录 原安装目录 D\:\soft\i\myeclipse10 新安装目录 E\:\soft\myeclipse10 双击启动失败, ...

  3. Eclipse无法启动错误之Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini)

    悲剧,在安装Android Build Tools时,提醒需要关闭Eclipse进行安装,于是我在Tools安装完成后重启了Eclipse.但是Eclipse却无法启动,在log中有如下提示: Una ...

  4. 【转】RCP中org.eclipse.core.runtime.CoreException

    org.eclipse.core.runtime.CoreException: Plug-in TRAIN was unable to load class train.Application. 利用 ...

  5. Eclipse Groovy插件使用时出现的错误 org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object

    在eclipse marketplace中下载了groovy插件,发现使用的groovy版本跟项目中使用的groovy版本不一致. 于是在Preferences -> Groovy -> ...

  6. windows系统中Dotnet core runtime 安装后,无法启动次程序,因为计算机中丢失api-ms-win-crt-runtime-l1-1-0.dll的解决方法

    因为dotnet core runtime依赖vc++2015,如果系统未安装vc++2015则会报上面的错误 解决方案:先下载安装vc++2015再安装dotnet core runtime, vc ...

  7. CentOS ASP.NET Core Runtime Jexus跨平台布署

    .net core 开源和跨平台,能布署到当前主流的Windows,Linux,macOS 系统上.本篇我们将在 Linux 系统上使用 ASP.NET Core Runtime 和 Jexus 布署 ...

  8. SWT/JFace开发遇到org.eclipse.core.runtime.IProgressMonitor问题的解决办法(转载)

    今日正在使用SWT和JFace开发一个系统,在搭建JFace平台时遇到了一个问题,运行HelloWorld程序抛出org.eclipse.core.runtime.IProgressMonitor的n ...

  9. .Net Core Runtime安装说明

    在开发阶段,都是直接安装.Net Core的SDK,但是在部署的时候你还是直接装SDK吗?当然直接装SDK也没什么问题,也可以少一些麻烦.但是如果你像我一样不喜欢在产线上装SDK,只想装Runtime ...

随机推荐

  1. dnspod动态域名使用感受

    继花生壳不能用之后,3322也开始不太好用了,首先就是360把所有3322的域名全部判定为危险域名,甚至拦截程序对于3322url的api请求. 所以想把3322换成我们自己的独立域名,但是3322他 ...

  2. ITF Demo代码(用VBScript构建的接口测试框架)

    ITF Demo代码(用VBScript构建的接口测试框架) http://blog.csdn.net/testing_is_believing/article/details/20872629

  3. 使用SQL联合查询来构建临时vo对象的应用

    联合查询: 表1: team球队表 表2:schedule 赛程表 需要数据: 球队名称.主队ID.主队名称.客队ID.客队名称.胜负情况 方法1. Object数组取出列和数值 import jav ...

  4. python高效解析日志入库

    python脚本解析日志文件入库一般有三个重要的步骤:读文件.解析文件.入库.在这三个方面下功夫,可确保我们获得最优的性能(这里不讨论并发) 1 读文件:一次读一行,磁盘IO太多,效率低下:一次性读如 ...

  5. nginx rewrite重写与防盗链配置

    nginx rewrite重写规则与防盗链配置方法 时间:2016-02-04 15:16:58来源:网络 导读:nginx rewrite重写规则与防盗链配置方法,rewrite规则格式中flag标 ...

  6. eclipse-java/spring mvc常见错误

    Dynamic Web Module 3.1 requires Java 1.7 or newer http://crunchify.com/how-to-solve-dynamic-web-modu ...

  7. .NET转Java

    懂C#的话,转Java也不是那么难,毕竟,语言语法还是相似的.尝试了下Java,说说自己的体会吧. 一,Java和C#都是完全面向对象的语言.在面向对象编程的三大原则方面,这两种语言接近得不能再接近. ...

  8. 封装系统自带的Debug

    Unity3d的Debug.Log函数用于打印日志,一般项目中都会对其作如下两件事情: (1)希望有一个总的开关来控制整个游戏中日志的打印与否: (2)有的系统会将Log封一层并添加统一的标记,比如S ...

  9. 编写高质量JS代码的68个有效方法(十二)

    No.56.避免不必要的状态 Tips: 尽可能地使用无状态的API 如果API是有状态的,标示出每个操作与哪些状态有关联 无状态的API简洁,更容易学习和使用,也不需要考虑其他的状态.如: 'tes ...

  10. 把一个对象转化为xml

    方法一:指定对象 private string ToGatheringEMXML(GatheringEMEntity entity) { string retSerialXml = "&qu ...