.NET Core Verifique se o Linux
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
Console.WriteLine("We're on macOS!");
}
Attractive Addax
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
Console.WriteLine("We're on macOS!");
}