Vixen
02b45cc4
csharp
public static class NativeRid

Which runtime identifier this process is, and what it will accept instead.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Computed, not looked up. .NET's RID graph is a build-time artefact: it is in the NuGet package's dependency resolution and in runtimeconfig.json, and neither of those is present in a NativeAOT application, which is one native binary and nothing else. So the fallback chain is written here, in the four lines it actually takes, rather than read from a file that will not be there on the target this project exists for.

The chain is architecture-specific first, then architecture-neutral: a binary built for osx-arm64 is preferred over one merely built for osx, and the latter is accepted because a great many native packages ship one directory per operating system and let the fat binary inside sort out the architecture.

Fields and properties (3)

  • public static string Current

    The runtime identifier this process is running as — osx-arm64.

  • public static string CurrentOperatingSystem

    The operating-system half on its own — osx.

  • public static IReadOnlyList<string> Chain

    The identifiers a native directory may be named, most specific first.

Methods (1)

  • public static IReadOnlyList<string> ChainFor(string rid)

    The chain for a runtime identifier other than this process's.

Used by (2)

  • NativeLibrariesVixen.Platform.Native
  • NativeResolutionTestsVixen.Platform.Native.Tests