{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/31002","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/31002/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/31002/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/31002/events","html_url":"https://github.com/dotnet/corefx/issues/31002","id":340416669,"node_id":"MDU6SXNzdWUzNDA0MTY2Njk=","number":31002,"title":"Expose a way to get the current RuntimeIdentifier at runtime","user":{"login":"tannergooding","id":10487869,"node_id":"MDQ6VXNlcjEwNDg3ODY5","avatar_url":"https://avatars3.githubusercontent.com/u/10487869?v=4","gravatar_id":"","url":"https://api.github.com/users/tannergooding","html_url":"https://github.com/tannergooding","followers_url":"https://api.github.com/users/tannergooding/followers","following_url":"https://api.github.com/users/tannergooding/following{/other_user}","gists_url":"https://api.github.com/users/tannergooding/gists{/gist_id}","starred_url":"https://api.github.com/users/tannergooding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannergooding/subscriptions","organizations_url":"https://api.github.com/users/tannergooding/orgs","repos_url":"https://api.github.com/users/tannergooding/repos","events_url":"https://api.github.com/users/tannergooding/events{/privacy}","received_events_url":"https://api.github.com/users/tannergooding/received_events","type":"User","site_admin":false},"labels":[{"id":703517252,"node_id":"MDU6TGFiZWw3MDM1MTcyNTI=","url":"https://api.github.com/repos/dotnet/corefx/labels/api-suggestion","name":"api-suggestion","color":"1d76db","default":false},{"id":174276033,"node_id":"MDU6TGFiZWwxNzQyNzYwMzM=","url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Runtime","name":"area-System.Runtime","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-07-11T21:43:33Z","updated_at":"2018-07-12T16:17:53Z","closed_at":null,"author_association":"MEMBER","body":"### Rationale\r\n\r\nIt is often the case, when working with .NET Core that you want to do something based on the current platform/architecture. In many cases, this can include needing to interop with tools published using a particular \"runtime identifier\".\r\n\r\nToday, the RuntimeIdentifier is only exposed through the `Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()` API and is not exposed as part of CoreFX. This requires referencing an additional package, and prevents it from being used in certain scenarios (such as evaluation time in MSBuild).\r\n\r\nAs such, I propose that we expose a mechanism to get the `RID` for the current execution environment at runtime.\r\n\r\n### Proposed API\r\n```C#\r\nnamespace System.Runtime.InteropServices\r\n{\r\n    public static class RuntimeInformation\r\n    {\r\n        public static string RuntimeIdentifier { get; }\r\n    }\r\n}\r\n```\r\n\r\n### Additional Notes\r\n\r\nThis would allow switching on the active `RID` from an MSBuild project/props/targets file, which would allow greater versatility in consuming native tools from a package during build time (or from a user program at runtime).\r\n\r\nIt may be worth reviewing the other APIs exposed via `Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment` and determining which others, if any, should also be exposed: https://github.com/dotnet/core-setup/blob/master/src/managed/Microsoft.DotNet.PlatformAbstractions/RuntimeEnvironment.cs"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/404568322","html_url":"https://github.com/dotnet/corefx/issues/31002#issuecomment-404568322","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/31002","id":404568322,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDU2ODMyMg==","user":{"login":"nguerrera","id":75470,"node_id":"MDQ6VXNlcjc1NDcw","avatar_url":"https://avatars0.githubusercontent.com/u/75470?v=4","gravatar_id":"","url":"https://api.github.com/users/nguerrera","html_url":"https://github.com/nguerrera","followers_url":"https://api.github.com/users/nguerrera/followers","following_url":"https://api.github.com/users/nguerrera/following{/other_user}","gists_url":"https://api.github.com/users/nguerrera/gists{/gist_id}","starred_url":"https://api.github.com/users/nguerrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguerrera/subscriptions","organizations_url":"https://api.github.com/users/nguerrera/orgs","repos_url":"https://api.github.com/users/nguerrera/repos","events_url":"https://api.github.com/users/nguerrera/events{/privacy}","received_events_url":"https://api.github.com/users/nguerrera/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T16:17:53Z","updated_at":"2018-07-12T16:17:53Z","author_association":"MEMBER","body":"^ This!"}}
{"actor":{"display_login":"nguerrera"}}