in build/DependencyHelper.cs [41:69]
private static string GetDefaultPlatformRid()
{
// This logic follows what the .NET Core host does in: https://github.com/dotnet/core-setup/blob/master/src/corehost/common/pal.h
// When running on a platform that is not supported in RID fallback graph (because it was unknown
// at the time the SharedFX in question was built), we need to use a reasonable fallback RID to allow
// consuming the native assets.
//
// For Windows and OSX, we will maintain the last highest RID-Platform we are known to support for them as the
// degree of compat across their respective releases is usually high.
//
// We cannot maintain the same (compat) invariant for linux and thus, we will fallback to using lowest RID-Plaform.
string rid = null;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
rid = DefaultWindowsRID;
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
rid = DefaultOSXRID;
}
else
{
rid = DefaultLinuxRID;
}
return rid;
}