950 references to RuntimeInformation
aspire (16)
Commands\UpdateCommand.cs (4)
226var exeName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "aspire.exe" : "aspire"; 266if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 324RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 349if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
DotNet\DotNetCliRunner.cs (1)
1212RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"
DotNet\DotNetSdkInstaller.cs (6)
40var dotnetExecutable = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 162if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 165if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 193if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 277return RuntimeInformation.ProcessArchitecture switch 302if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Utils\CliDownloader.cs (5)
112if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 116else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 150else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 156throw new PlatformNotSupportedException($"Unsupported operating system: {RuntimeInformation.OSDescription}"); 162var arch = RuntimeInformation.ProcessArchitecture;
Aspire.Cli.Tests (1)
Commands\UpdateCommandTests.cs (1)
120if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Aspire.Dashboard (2)
Components_Dialogs_SettingsDialog_razor.g.cs (1)
720__builder3.AddContent(76, string.Format(Loc[nameof(Dialogs.SettingsDialogDotNetRuntimeVersion)], System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription)
Utils\VersionHelpers.cs (1)
19var description = RuntimeInformation.FrameworkDescription;
Aspire.EndToEnd.Tests (6)
tests\Shared\TemplatesTesting\BuildEnvironment.cs (4)
91string buildCmd = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".\\build.cmd" : "./build.sh"; 104.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet")) 127.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet")) 188if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
39if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
188if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Aspire.Hosting.DevTunnels (2)
DevTunnelCli.cs (1)
370if (!useShellExecute && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
RequiredCommandValidator.cs (1)
151if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Aspire.Hosting.Maui.Tests (1)
MauiWindowsExtensionsTests.cs (1)
288if (!System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows))
Aspire.Templates.Tests (6)
tests\Shared\TemplatesTesting\BuildEnvironment.cs (4)
91string buildCmd = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".\\build.cmd" : "./build.sh"; 104.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet")) 127.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet")) 188if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
39if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
188if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
BuildValidator (4)
IldasmUtilities.cs (4)
18return RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant(); 29if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 33else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 37else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
ClientSample (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Crossgen2Tasks (13)
PrepareForReadyToRunCompilation.cs (2)
82return RuntimeInformation.IsOSPlatform(OSPlatform.Windows); 94return RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
ResolveReadyToRunCompilers.cs (11)
292if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 296if (RuntimeInformation.OSArchitecture == _targetArchitecture) 313if (RuntimeInformation.OSArchitecture == _targetArchitecture) 322if (RuntimeInformation.OSArchitecture != Architecture.X64) 346else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 350if (RuntimeInformation.OSArchitecture == _targetArchitecture) 355else if (RuntimeInformation.OSArchitecture == Architecture.X64) 372else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 375if (_targetArchitecture != Architecture.X64 || RuntimeInformation.OSArchitecture != Architecture.X64) 396if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 401else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
dotnet (47)
CommandLineInfo.cs (1)
50string currentRid = RuntimeInformation.RuntimeIdentifier;
Commands\Run\CSharpCompilerCommand.cs (2)
46internal static string RuntimeVersion => field ??= RuntimeInformation.FrameworkDescription.Split(' ').Last(); 270var rid = RuntimeInformation.RuntimeIdentifier;
Commands\Run\RunCommand.cs (2)
476runtimeIdentifier: RuntimeInformation.RuntimeIdentifier, 477defaultAppHostRuntimeIdentifier: RuntimeInformation.RuntimeIdentifier,
Commands\Run\VirtualProjectBuildingCommand.cs (1)
1101string directory = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Commands\Test\MTP\Terminal\AnsiTerminal.cs (1)
42private readonly bool _useBusyIndicator = !RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
Commands\Test\MTP\Terminal\NativeMethods.cs (1)
23s_isWindows ??= RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
Commands\Test\MTP\Terminal\NonAnsiTerminal.cs (5)
43_colorNotSupported ??= RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID")) || 44RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) || 45RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS")) || 46RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI")) || 47RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
Commands\Test\MTP\TestApplication.cs (3)
289{ HandshakeMessagePropertyNames.Architecture, RuntimeInformation.ProcessArchitecture.ToString() }, 290{ HandshakeMessagePropertyNames.Framework, RuntimeInformation.FrameworkDescription }, 291{ HandshakeMessagePropertyNames.OS, RuntimeInformation.OSDescription },
Commands\Test\VSTest\TestCommand.cs (1)
540s_isWindows ??= RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
Commands\Test\VSTest\VSTestForwardingApp.cs (1)
51["VSTEST_DOTNET_ROOT_ARCHITECTURE"] = RuntimeInformation.ProcessArchitecture.ToString()
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (1)
225string appHostSourceDirectory = _shellShimTemplateFinder.ResolveAppHostSourceDirectoryAsync(_architectureOption, framework, RuntimeInformation.ProcessArchitecture).Result;
Commands\Workload\Install\FileBasedInstaller.cs (1)
626return Path.Combine(_workloadMetadataDir, RuntimeInformation.ProcessArchitecture.ToString(), _sdkFeatureBand.ToString(), HistoryDir);
Commands\Workload\Install\MsiInstallerBase.cs (1)
377return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "dotnet", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), sdkFeatureBand.ToString(), "history");
Commands\Workload\Install\NetSdkMsiInstallerClient.cs (2)
737return new PackageId($"{manifestId}.{featureBand}.Msi.{RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant()}"); 741return new PackageId($"{manifestId}.Manifest-{featureBand}.Msi.{RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant()}");
CommonOptions.cs (1)
357RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal);
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
Installer\Windows\InstallerBase.cs (1)
36public static readonly string HostArchitecture = RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
NuGetSignatureVerificationEnabler.cs (1)
53return RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
PerformanceLogEventSource.cs (3)
36SDKInfo(Product.Version, commitSha, RuntimeInformation.RuntimeIdentifier, versionFile.BuildRid, AppContext.BaseDirectory); 240if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 251else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Telemetry\DevDeviceIDGetter.cs (6)
41if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 49else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 68else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 83if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 97else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 113else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Telemetry\TelemetryCommonProperties.cs (4)
10using RuntimeInformation = System.Runtime.InteropServices.RuntimeInformation; 66{OSArchitecture, RuntimeInformation.OSArchitecture.ToString()}, 68{RuntimeId, RuntimeInformation.RuntimeIdentifier}, 144return RuntimeInformation.OSDescription;
ToolManifest\ToolManifestFinder.cs (1)
190return !RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
ToolPackage\ToolPackageDownloader.cs (2)
184RuntimeInformation.RuntimeIdentifier); 199RuntimeIdentifier = RuntimeInformation.RuntimeIdentifier
ToolPackage\ToolPackageDownloaderBase.cs (3)
343Reporter.Output.WriteLine($"Target RID: {RuntimeInformation.RuntimeIdentifier}"); 347var bestRuntimeIdentifier = Microsoft.NET.Build.Tasks.NuGetUtils.GetBestMatchingRid(runtimeGraph, RuntimeInformation.RuntimeIdentifier, toolConfiguration.RidSpecificPackages.Keys, out bool wasInGraph); 350throw new ToolPackageException(string.Format(CliStrings.ToolUnsupportedRuntimeIdentifier, RuntimeInformation.RuntimeIdentifier,
dotnet.Tests (54)
CommandFactoryTests\GivenAnAppBaseCommandResolver.cs (1)
188if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
CommandFactoryTests\GivenAProjectPathCommandResolver.cs (1)
244if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
CommandTests\MSBuild\GivenDotnetMSBuildBuildsProjects.cs (1)
75if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
CommandTests\MSBuild\GivenDotnetOsArchOptions.cs (9)
29var expectedArch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86"; 43var expectedOs = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "win" : 44RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? "linux" : 45RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "osx" : 140.Execute(command, "--arch", RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86") 168var expectedArch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86"; 187var expectedOs = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "win" : 188RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? "linux" : 189RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? "osx" :
CommandTests\MSBuild\TestPathUtilities.cs (1)
12RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
CommandTests\Restore\GivenThatIWantToRestoreApp.cs (5)
261if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 263else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 265else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 273return RuntimeInformation.OSArchitecture switch 279_ => throw new PlatformNotSupportedException($"Unsupported architecture: {RuntimeInformation.OSArchitecture}")
CommandTests\Run\GivenDotnetRootEnv.cs (2)
46var processArchitecture = RuntimeInformation.ProcessArchitecture.ToString().ToUpperInvariant(); 87string processArchitecture = RuntimeInformation.ProcessArchitecture.ToString().ToUpperInvariant();
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (1)
976var dotnetLaunchProfile = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
CommandTests\Run\RunFileTests.cs (4)
112return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 113|| RuntimeInformation.IsOSPlatform(OSPlatform.OSX); 1535var appBinaryName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "Program.exe" : "Program"; 3444.WithEnvironmentVariable($"DOTNET_ROOT_{RuntimeInformation.OSArchitecture.ToString().ToUpperInvariant()}", string.Empty)
CommandTests\Store\GivenDotnetStoresAndPublishesProjects.cs (1)
9private static string _arch = RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs (1)
154var arch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86";
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs (4)
221var arch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86"; 241var arch = RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant(); 287var arch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86"; 325var arch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86";
CommandTests\Test\NamedPipeClient.cs (1)
95if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (2)
863string toolTargetRuntimeIdentifier = OperatingSystem.IsWindows() ? "win-x64" : RuntimeInformation.RuntimeIdentifier; 933var extension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
CommandTests\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommandTests.cs (3)
77(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : "")); 119(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : "")); 189(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : ""));
CommandTests\Tool\Update\ToolUpdateGlobalOrToolPathCommandTests.cs (3)
415Log.WriteLine($"Current RuntimeIdentifier: {RuntimeInformation.RuntimeIdentifier}"); 417string toolTargetRuntimeIdentifier = OperatingSystem.IsWindows() ? "win-x64" : RuntimeInformation.RuntimeIdentifier; 419var extension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
CommandTests\Workload\Install\GivenFileBasedWorkloadInstall.cs (1)
37var path = Path.Combine(dotnetRoot, "metadata", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), stringFeatureBand, "InstallState", "default.json");
CommandTests\Workload\Install\WorkloadGarbageCollectionTests.cs (1)
343var installStateFolder = Path.Combine(_dotnetRoot!, "metadata", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), featureBand, "InstallState");
CommandTests\Workload\Restore\GivenDotnetWorkloadRestore.cs (1)
68string osDescription = RuntimeInformation.OSDescription.ToLowerInvariant();
CommandTests\Workload\Update\GivenDotnetWorkloadUpdate.cs (2)
324var installStatePath = Path.Combine(dotnetDir, "metadata", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), sdkVersion, "InstallState", "default.json"); 550var defaultJsonPath = Path.Combine(dotnetPath, "metadata", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), "6.0.300", "InstallState", "default.json");
GivenThatDotNetRunsCommands.cs (1)
42.WithEnvironmentVariable(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME", value)
ParserTests\CommonOptionsTests.cs (1)
36if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
ShellShimTests\ShellShimRepositoryTests.cs (4)
367if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 396if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 433if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 445if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
TelemetryCommonPropertiesTests.cs (3)
101unitUnderTest.GetTelemetryCommonProperties("dummySessionId")["Kernel Version"].Should().Be(RuntimeInformation.OSDescription); 108unitUnderTest.GetTelemetryCommonProperties("dummySessionId")["OS Architecture"].Should().Be(RuntimeInformation.OSArchitecture.ToString()); 158if (!RuntimeInformation.RuntimeIdentifier.Contains("alpine", StringComparison.OrdinalIgnoreCase))
dotnet-dev-certs (10)
Program.cs (7)
270if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 275if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 280if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 377if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 399if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 408if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 414if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
src\Shared\CertificateGeneration\CertificateManager.cs (2)
639if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 667if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
dotnet-format.UnitTests (2)
XUnit\ConditionalFactAttribute.cs (2)
94public static bool IsMacOS => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); 95public static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
dotnet-getdocument (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
dotnet-new.IntegrationTests (3)
CommonTemplatesTests.cs (1)
133if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
PostActionTests.cs (2)
332if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 415if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
dotnet-openapi (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
dotnet-sql-cache (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
dotnet-svcutil-lib (4)
AppInsightsTelemetryClient.cs (3)
169if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 173else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 177else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Shared\Utilities\RuntimeEnvironmentHelper.cs (1)
21return System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
dotnet-svcutil-lib.Tests (6)
FixupUtil.cs (2)
58if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 62else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
GlobalToolTests.cs (1)
91if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux))
TestInit.cs (2)
268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile)))) 354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
UnitTest.cs (1)
207if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux))
dotnet-user-jwts (2)
Helpers\JwtStore.cs (1)
43if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
dotnet-user-secrets (3)
Internal\SecretsStore.cs (1)
83if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Internal\SetCommand.cs (1)
25var catCmd = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
dotnet-watch (5)
Process\ProcessRunner.cs (3)
177if (processSpec.IsUserApplication && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 237var forceOnly = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !processSpec.IsUserApplication; 324if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
UI\PhysicalConsole.cs (1)
48if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Utilities\ProcessUtilities.cs (1)
22Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
dotnet-watch.Tests (8)
FileWatcher\FileWatcherTests.cs (7)
158expectedChanges: !RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || usePolling 177if (!usePolling && !(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX))) 192expectedChanges: !RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || usePolling 246expectedChanges: RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && !usePolling ? 283expectedChanges = !RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || usePolling ? 477expectedChanges: RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && !usePolling ?
HotReload\ApplyDeltaTests.cs (1)
943var platform = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "windows10.0.19041.0" : "maccatalyst";
EndToEnd.Tests (4)
ProjectBuildTests.cs (4)
106.. RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Array.Empty<string>() : ["/p:EnableWindowsTargeting=true"], 393if (RuntimeInformation.RuntimeIdentifier.StartsWith("linux-musl")) 444if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 463.. selfContained ? ["-r", RuntimeInformation.RuntimeIdentifier] : Array.Empty<string>(),
GetDocument.Insider (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
HttpStress (1)
Program.cs (1)
403if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Infrastructure.Common (2)
FrameworkHelper.cs (1)
30_currentFrameworkDescription = RuntimeInformation.FrameworkDescription;
OSHelper.cs (1)
68_currentOSDescription = RuntimeInformation.OSDescription;
Infrastructure.IntegrationTests (3)
OSAndFrameworkTests.4.1.1.cs (3)
18RuntimeInformation.FrameworkDescription)); 28RuntimeInformation.OSDescription, 64string runtimeOSDescription = RuntimeInformation.OSDescription;
Interop.FunctionalTests (3)
H2SpecCommands.cs (1)
48if (RuntimeInformation.OSArchitecture != Architecture.X64)
SkipOnArchitectureAttribute.cs (2)
21public bool IsMet => (Array.IndexOf(_excludedArchitectures, RuntimeInformation.OSArchitecture) == -1); 23public string SkipReason => $"This test is running on {RuntimeInformation.OSArchitecture} which is marked as to be skipped.";
KeyManagementSample (1)
Program.cs (1)
21if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Arcade.Common (2)
Command.cs (1)
14public static readonly string[] RunnableSuffixes = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
CommandFactory.cs (1)
54if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.AspNetCore.App.UnitTests (1)
TestData.cs (1)
166if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
Microsoft.AspNetCore.Components.WebAssembly (1)
JSExports.g.cs (1)
21if (initialized || global::System.Runtime.InteropServices.RuntimeInformation.OSArchitecture != global::System.Runtime.InteropServices.Architecture.Wasm)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.AspNetCore.Components.WebView.Photino (1)
PhotinoWebViewManager.cs (1)
20internal static readonly string BlazorAppScheme = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
BasicBlazorHybridTest.cs (1)
26var newNativePath = Path.Combine(thisProgramDir, "runtimes", RuntimeInformation.RuntimeIdentifier, "native");
Microsoft.AspNetCore.DataProtection (16)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (1)
82Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactory.cs (1)
43Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactory.cs (1)
44Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
DataProtectionServiceCollectionExtensions.cs (1)
64Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
EphemeralDataProtectionProvider.cs (2)
50Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 103Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Internal\ContainerUtils.cs (2)
27if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 91if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
KeyManagement\XmlKeyManager.cs (5)
606else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && typeof(CngCbcAuthenticatedEncryptorDescriptorDeserializer).MatchName(typeNameToMatch, _typeNameResolver)) 610else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && typeof(CngGcmAuthenticatedEncryptorDescriptorDeserializer).MatchName(typeNameToMatch, _typeNameResolver)) 668Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); // Hint for the platform compatibility analyzer. 693Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); // Hint for the platform compatibility analyzer. 698Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); // Hint for the platform compatibility analyzer.
Repositories\DefaultKeyStorageDirectories.cs (2)
41if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !string.IsNullOrEmpty(localAppDataFromSystemPath)) 53if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Repositories\FileSystemXmlRepository.cs (1)
144if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.AspNetCore.DataProtection.Extensions.Tests (1)
DataProtectionProviderTests.cs (1)
78if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.AspNetCore.DataProtection.Tests (4)
Internal\KeyManagementOptionsSetupTest.cs (1)
129public bool IsMet => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && LazyHkcuTempKey.Value != null);
RegistryPolicyResolverTests.cs (1)
301public bool IsMet => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && LazyHkcuTempKey.Value != null);
Repositories\FileSystemXmlRepositoryTests.cs (1)
18var baseDir = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Repositories\RegistryXmlRepositoryTests.cs (1)
252public bool IsMet => (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && LazyHkcuTempKey.Value != null);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
639if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 667if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (4)
CertificateManagerTests.cs (4)
552Manager = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 554RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? 570if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Microsoft.AspNetCore.Hosting (3)
src\Shared\ErrorPage\ErrorPageModelBuilder.cs (3)
50RuntimeInformation.FrameworkDescription, 51RuntimeInformation.ProcessArchitecture.ToString(), 54RuntimeInformation.OSDescription);
Microsoft.AspNetCore.Http.Connections.Client (4)
Internal\Constants.cs (4)
27var runtimeVersion = RuntimeInformation.FrameworkDescription; 34if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 38else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 42else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Microsoft.AspNetCore.InternalTesting (19)
DumpCollector\DumpCollector.cs (1)
13if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
HttpClientSlim.cs (1)
111var retryCount = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 1 : 3;
TestPlatformHelper.cs (3)
15RuntimeInformation.IsOSPlatform(OSPlatform.Windows); 18RuntimeInformation.IsOSPlatform(OSPlatform.Linux); 21RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
xunit\DockerOnlyAttribute.cs (1)
20if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
xunit\MaximumOSVersionAttribute.cs (4)
55if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 59else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 63else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 72if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
xunit\MinimumOsVersionAttribute.cs (4)
51if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 55else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 59else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 68if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
xunit\OSSkipConditionAttribute.cs (3)
47if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 51else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 55else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
xunit\SkipOnAlpineAttribute.cs (1)
30RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists("/etc/os-release") &&
xunit\SkipOnHelixAttribute.cs (1)
64if (Queues.Contains("All.Linux") && RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Microsoft.AspNetCore.InternalTesting.Tests (23)
DockerTests.cs (1)
18Assert.False(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
MaximumOSVersionTest.cs (6)
20RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && 31RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && 41Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 54Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 71RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && 84if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
MinimumOSVersionTest.cs (5)
19RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && 30RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && 40Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 53Assert.True(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 69RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
OSSkipConditionTest.cs (11)
16RuntimeInformation.IsOSPlatform(OSPlatform.Linux), 25RuntimeInformation.IsOSPlatform(OSPlatform.OSX), 34RuntimeInformation.IsOSPlatform(OSPlatform.Windows), 43RuntimeInformation.IsOSPlatform(OSPlatform.Linux), 46RuntimeInformation.IsOSPlatform(OSPlatform.OSX), 56RuntimeInformation.IsOSPlatform(OSPlatform.Linux), 66RuntimeInformation.IsOSPlatform(OSPlatform.OSX), 76RuntimeInformation.IsOSPlatform(OSPlatform.Windows), 86RuntimeInformation.IsOSPlatform(OSPlatform.Linux), 89RuntimeInformation.IsOSPlatform(OSPlatform.OSX), 101RuntimeInformation.IsOSPlatform(OSPlatform.Windows),
Microsoft.AspNetCore.OpenApi.Build.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.AspNetCore.Server.IIS (3)
src\Shared\ErrorPage\ErrorPageModelBuilder.cs (3)
50RuntimeInformation.FrameworkDescription, 51RuntimeInformation.ProcessArchitecture.ToString(), 54RuntimeInformation.OSDescription);
Microsoft.AspNetCore.Server.IntegrationTesting (9)
Common\DotNetCommands.cs (2)
88return (RuntimeInformation.OSArchitecture == Architecture.X64 || RuntimeInformation.OSArchitecture == Architecture.Arm64)
Common\RuntimeArchitectures.cs (2)
14return RuntimeInformation.OSArchitecture switch 21_ => throw new NotImplementedException($"Unknown RuntimeInformation.OSArchitecture: {RuntimeInformation.OSArchitecture.ToString()}"),
TestMatrix.cs (3)
60if (RuntimeInformation.OSArchitecture == Architecture.X64) 253return (RuntimeInformation.OSArchitecture == Architecture.Arm || RuntimeInformation.OSArchitecture == Architecture.X86)
xunit\SkipOn32BitOSAttribute.cs (2)
16RuntimeInformation.OSArchitecture == Architecture.Arm64 17|| RuntimeInformation.OSArchitecture == Architecture.X64;
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
ProcessTracker.cs (1)
18if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || Environment.OSVersion.Version < new Version(6, 2))
Microsoft.AspNetCore.Server.Kestrel.Core (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
639if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 667if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
SkipOnMarinerAttribute.cs (1)
25RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists("/etc/os-release") &&
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Docker.cs (1)
58if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.AspNetCore.Testing (1)
FakeSslCertificateFactory.cs (1)
16private static readonly RSA _rsa = GenerateRsa(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Microsoft.AspNetCore.WebUtilities (2)
FileBufferingReadStream.cs (1)
246if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
FileBufferingWriteStream.cs (1)
273if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Build (8)
BuildCheck\Checks\UntrustedLocationCheck.cs (2)
63if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 80else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Construction\Solution\SolutionFile.cs (1)
132private static readonly StringComparer _pathComparer = RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
Evaluation\IntrinsicFunctions.cs (1)
583return RuntimeInformation.IsOSPlatform(OSPlatform.Create(platformString.ToUpperInvariant()));
InprocTrackingNativeMethods.cs (1)
153private static readonly Lazy<string> fileTrackerDllName = new Lazy<string>(() => RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "FileTrackerA4.dll" : (IntPtr.Size == sizeof(Int32)) ? "FileTracker32.dll" : "FileTracker64.dll");
Logging\TerminalLogger\Terminal.cs (1)
87public bool SupportsProgressReporting { get; } = !RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
Resources\Constants.cs (1)
326var runtimeInformationType = new Tuple<string, Type>(null, typeof(RuntimeInformation));
XMakeAttributes.cs (1)
431switch (RuntimeInformation.ProcessArchitecture)
Microsoft.Build.BuildCheck.UnitTests (3)
ExecCliBuildCheck_Tests.cs (2)
48string.Join(";", new string('a', RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? MaxStackSizeWindows * 2 : MaxStackSizeLinux * 2), "dotnet build")); 58new string('a', RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? MaxStackSizeWindows * 2 : MaxStackSizeLinux * 2));
TestAssemblyInfo.cs (1)
138if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Build.CommandLine.UnitTests (2)
TestAssemblyInfo.cs (1)
138if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
XMake_Tests.cs (1)
941if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !EncodingUtilities.CurrentPlatformIsWindowsAndOfficiallySupportsUTF8Encoding())
Microsoft.Build.Engine.OM.UnitTests (1)
TestAssemblyInfo.cs (1)
138if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Build.Engine.UnitTests (2)
Evaluation\Expander_Tests.cs (1)
2889var currentArchitectureString = RuntimeInformation.OSArchitecture.ToString();
TestAssemblyInfo.cs (1)
138if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Build.Framework (9)
EncodingUtilities.cs (2)
287else if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 298if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version.Major >= 10) // UTF-8 is only officially supported on 10+.
FileClassifier.cs (1)
69private static readonly StringComparison PathComparison = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase;
NativeMethods.cs (6)
768get { return RuntimeInformation.IsOSPlatform(OSPlatform.Linux); } 782return RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD")) || 783RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD")) || 784RuntimeInformation.IsOSPlatform(OSPlatform.Create("OPENBSD")); 803_isWindows ??= RuntimeInformation.IsOSPlatform(OSPlatform.Windows); 823_isOSX ??= RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
Microsoft.Build.Framework.UnitTests (1)
TestAssemblyInfo.cs (1)
138if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1118if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1118if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Build.Tasks.Core (1)
XMakeAttributes.cs (1)
431switch (RuntimeInformation.ProcessArchitecture)
Microsoft.Build.Tasks.UnitTests (2)
TestAssemblyInfo.cs (1)
138if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
WriteCodeFragment_Tests.cs (1)
577public static readonly string VBLineSeparator = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? $"{VBCarriageReturn}&{VBLineFeed}" : VBLineFeed;
Microsoft.Build.UnitTests.Shared (5)
EnvironmentProvider.cs (1)
22public static readonly bool RunningOnWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
LongPathSupportDisabledFactAttribute.cs (1)
23if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
ObjectModelHelpers.cs (3)
1140if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 1144else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 1148else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.Build.Utilities.Core (1)
InprocTrackingNativeMethods.cs (1)
153private static readonly Lazy<string> fileTrackerDllName = new Lazy<string>(() => RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "FileTrackerA4.dll" : (IntPtr.Size == sizeof(Int32)) ? "FileTracker32.dll" : "FileTracker64.dll");
Microsoft.Build.Utilities.UnitTests (1)
TestAssemblyInfo.cs (1)
138if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.CodeAnalysis (5)
Compilation\DeterministicKeyBuilder.cs (2)
246writer.Write("frameworkDescription", RuntimeInformation.FrameworkDescription); 247writer.Write("osDescription", RuntimeInformation.OSDescription);
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
416if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
DiaSymReader\SymUnmanagedFactory.cs (2)
36=> RuntimeInformation.ProcessArchitecture switch 178switch (RuntimeInformation.ProcessArchitecture, createReader)
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CSharpCommandLineParser.cs (1)
288if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
CommandLineTests.cs (6)
6000ProcessResult result = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 6023string output = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 6036ProcessResult result = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 6069ProcessResult result = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 6103ProcessResult result = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 6115ProcessResult result = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
213if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
182int numberFluentCalls = (IntPtr.Size, ExecutionConditionUtil.Configuration, RuntimeUtilities.IsDesktopRuntime, RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) switch
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\FileModifierTests.cs (1)
831var (root1, root2) = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? (@"q:\", @"j:\") : ("/q", "/j");
Microsoft.CodeAnalysis.Features (1)
SymbolSearch\Windows\SymbolSearchUpdateEngineFactory.cs (1)
39return RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Microsoft.CodeAnalysis.LanguageServer (6)
FileBasedPrograms\VirtualProjectXmlProvider.cs (1)
187string directory = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (2)
68private static readonly StringComparer s_stringComparer = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase; 69private static readonly StringComparison s_stringComparison = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase;
Program.cs (3)
82if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 99logger.LogTrace($".NET Runtime Version: {RuntimeInformation.FrameworkDescription}"); 327return RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
Utilities\AbstractLanguageServerClientTests.TestLspClient.cs (2)
75return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 84FileName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet",
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
CSharpDeterministicKeyBuilderTests.cs (3)
145var path = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 234""frameworkDescription"": ""{RuntimeInformation.FrameworkDescription}"", 235""osDescription"": ""{RuntimeInformation.OSDescription}""
DeterministicKeyBuilderTests.cs (1)
563var path = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\ProcessTelemetry\RemoteProcessTelemetryService.cs (1)
58m["Framework"] = RuntimeInformation.FrameworkDescription;
Microsoft.CodeAnalysis.Remote.Workspaces (2)
ServiceDescriptors.cs (2)
135=> !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework") && 136!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native");
Microsoft.CodeAnalysis.Scripting (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCache.cs (1)
28return System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription.Contains(".NET Framework")
Microsoft.CodeAnalysis.Test.Utilities (5)
Assert\ConditionalFactAttribute.cs (2)
156public static bool IsMacOS => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); 157public static bool IsLinux => RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
Compilation\RuntimeUtilities.cs (1)
37=> IsCoreClrRuntime && RuntimeInformation.FrameworkDescription.StartsWith(".NET 6.", StringComparison.Ordinal);
Metadata\IlasmUtilities.cs (1)
29return RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
TestableCompiler.cs (1)
49internal static string RootDirectory => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? @"q:\" : "/";
Microsoft.CodeAnalysis.VisualBasic (1)
CommandLine\VisualBasicCommandLineParser.vb (1)
450If RuntimeInformation.IsOSPlatform(OSPlatform.Windows) Then
Microsoft.CodeAnalysis.Workspaces (4)
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
416if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Storage\SQLite\v2\Interop\SqlConnection.cs (1)
136var attachString = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (2)
95else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 100else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\BuildHostProcessManager.cs (2)
36private static readonly string DotnetExecutable = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"; 363var frameworkHostType = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? BuildHostProcessKind.NetFramework : BuildHostProcessKind.Mono;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Program.cs (1)
40logger.LogInformation($"BuildHost Runtime Version: {System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription}");
Microsoft.CodeAnalysis.XunitHook (1)
XunitDisposeHook.cs (1)
40switch (RuntimeInformation.ProcessArchitecture)
Microsoft.DotNet.ApiCompatibility.Tests (1)
Logging\TestSuppressionEngine.cs (1)
14private static readonly string s_suppressionsHeader = RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework") ?
Microsoft.DotNet.Arcade.Sdk (3)
src\InstallDotNetCore.cs (3)
102if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && string.Equals("x86", architecture, StringComparison.OrdinalIgnoreCase)) 197else if (RuntimeInformation.OSArchitecture == Architecture.X86 || 198RuntimeInformation.OSArchitecture == Architecture.X64)
Microsoft.DotNet.Arcade.Sdk.Tests (4)
RepoWithConditionalProjectsToBuildTests.cs (1)
32var packArg = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Utilities\TestApp.cs (3)
38var cmd = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 50var cmd = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 64if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.DotNet.ArcadeAzureIntegration (3)
AzureCliCredentialWithAzNoUpdateWrapper.cs (3)
40private static readonly string DefaultPath = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? DefaultPathWindows : DefaultPathNonWindows; 41private static readonly string DefaultWorkingDir = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? DefaultWorkingDirWindows : DefaultWorkingDirNonWindows; 62if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.DotNet.Build.Tasks.Feed (1)
src\common\NativeMethods.cs (1)
34if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.DotNet.Cli.Utils (23)
Constants.cs (1)
14RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
DangerousFileDetector.cs (1)
14if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
EnvironmentProvider.cs (1)
24_executableExtensions = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
FileNameSuffixes.cs (2)
16if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 20else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
FrameworkDependencyFile.cs (1)
45RuntimeInformation.RuntimeIdentifier,
PathUtility.cs (3)
183if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 320if (result.EndsWith(":") && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 343if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
ProcessReaper.cs (3)
36if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 48if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 65if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
RuntimeEnvironment.cs (9)
70return RuntimeInformation.OSDescription.Split(' ')[2].Split('.')[0]; 159var versionDescription = RuntimeInformation.OSDescription.Split(' ')[2]; 217if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 221if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 225if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 230if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD)) 234if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"))) 238if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"))) 242if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("HAIKU")))
UILanguageOverride.cs (2)
119if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version.Major >= 10) // UTF-8 is only officially supported on 10+. 128Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Microsoft.DotNet.Internal.SymbolHelper (2)
SymbolUploadHelperFactory.cs (2)
176if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || RuntimeInformation.ProcessArchitecture != Architecture.X64)
Microsoft.DotNet.MacOsPkg.Cli (1)
Program.cs (1)
24if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.DotNet.MSBuildSdkResolver (6)
Constants.cs (1)
15RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
Interop.cs (2)
10public static readonly bool RunningOnWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); 37string architecture = RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
MSBuildSdkResolver.cs (2)
239?? Path.Combine(dotnetRoot, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Constants.DotNetExe : Constants.DotNet); 352var expectedFileName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Constants.DotNetExe : Constants.DotNet;
WorkloadInstallType.cs (1)
36var architecture = RuntimeInformation.ProcessArchitecture.ToString();
Microsoft.DotNet.MSBuildSdkResolver.Tests (4)
GivenAnMSBuildSdkResolver.cs (4)
205if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 325if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 618public string Muxer => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"; 644identifier: identifier + RuntimeInformation.FrameworkDescription,
Microsoft.DotNet.NativeWrapper (3)
Constants.cs (1)
15RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
Interop.cs (2)
10public static readonly bool RunningOnWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); 37string architecture = RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
Microsoft.DotNet.PackageInstall.Tests (4)
EndToEndToolTests.cs (1)
302List<string> expectedRids = [.. ToolsetInfo.LatestRuntimeIdentifiers.Split(';').Where(rid => rid != RuntimeInformation.RuntimeIdentifier), "any"];
TestToolBuilder.cs (3)
115var multiRid = toolSettings.IncludeCurrentRid ? ToolsetInfo.LatestRuntimeIdentifiers : ToolsetInfo.LatestRuntimeIdentifiers.Replace(RuntimeInformation.RuntimeIdentifier, string.Empty).Trim(';'); 183new DotnetPackCommand(log, "-r", RuntimeInformation.RuntimeIdentifier) 185.Execute(collectBinlogs ? $"--bl:{toolSettings.GetIdentifier()}-{RuntimeInformation.RuntimeIdentifier}-{{}}" : "")
Microsoft.DotNet.RemoteExecutor (17)
PasteArguments.cs (1)
26if (pasteFirstArgumentUsingArgV0Rules && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
RemoteExecutor.cs (10)
60string hostName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"; 84else if (RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)) 95Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); 111!RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) && 112!RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID")) && 113!RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS")) && 114!RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST")) && 115!RuntimeInformation.IsOSPlatform(OSPlatform.Create("WATCHOS")) && 116!RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")) && 117!RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI")) &&
RemoteInvokeHandle.cs (5)
115if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 150if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 179if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && // As of Microsoft.Diagnostics.Runtime v1.0.5, process attach only works on Windows. 237int expected = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Options.ExpectedExitCode : unchecked((sbyte)Options.ExpectedExitCode); 238int actual = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Process.ExitCode : unchecked((sbyte)Process.ExitCode);
RemoteInvokeOptions.cs (1)
52if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.DotNet.SetupNugetSources.Tests (3)
ScriptRunner.cs (3)
46if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 57var shell = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "bash.exe" : "/bin/bash"; 121return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ScriptType.PowerShell : ScriptType.Shell;
Microsoft.DotNet.SignCheckLibrary (5)
Verification\LinuxPackageVerifier.cs (1)
31if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Verification\MachOVerifier.cs (1)
24if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Verification\PkgVerifier.cs (2)
32if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 69if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Verification\RpmVerifier.cs (1)
20if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Microsoft.DotNet.SignTool (13)
src\FileSignInfo.cs (4)
115(IsUnpackableWixContainer() && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) || 119(IsPkg() && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) || 120(IsAppBundle() && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) || 124(IsRpm() && RuntimeInformation.IsOSPlatform(OSPlatform.Linux));
src\SignTool.cs (2)
82if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 115if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
src\SignToolTask.cs (1)
245if (PkgToolPath == null && RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
src\VerifySignatures.cs (3)
38if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 79if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 179if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
src\ZipData.cs (3)
92if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 150if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 316if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.DotNet.SignTool.Tests (3)
SignToolTests.cs (3)
1970if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 2001if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 3465RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Microsoft.DotNet.StrongName (1)
Verification.cs (1)
147if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.DotNet.TemplateLocator (3)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
WorkloadInstallType.cs (1)
36var architecture = RuntimeInformation.ProcessArchitecture.ToString();
Microsoft.DotNet.Tools.Tests.ComponentMocks (1)
ToolPackageDownloaderMock2.cs (1)
75"{{DefaultTargetFramework}}/{{RuntimeInformation.RuntimeIdentifier}}": {
Microsoft.DotNet.XUnitExtensions (28)
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\LinuxOnlyFactAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\LinuxOnlyTheoryAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\MacOSOnlyFactAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\MacOSOnlyTheoryAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\UnixOnlyFactAttribute.cs (1)
22if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\UnixOnlyTheoryAttribute.cs (1)
22if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\WindowsFullFrameworkOnlyFactAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\WindowsFullFrameworkOnlyTheoryAttribute.cs (1)
23if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\WindowsOnlyFactAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\WindowsOnlyTheoryAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (18)
17public static bool IsRunningOnNetCoreApp { get; } = (Environment.Version.Major >= 5 || !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)); 18public static bool IsRunningOnNetFramework { get; } = RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase); 22(platforms.HasFlag(TestPlatforms.FreeBSD) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD"))) || 23(platforms.HasFlag(TestPlatforms.Linux) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) || 24(platforms.HasFlag(TestPlatforms.NetBSD) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"))) || 25(platforms.HasFlag(TestPlatforms.OSX) && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) || 26(platforms.HasFlag(TestPlatforms.illumos) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"))) || 27(platforms.HasFlag(TestPlatforms.Solaris) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"))) || 28(platforms.HasFlag(TestPlatforms.iOS) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) && !RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"))) || 29(platforms.HasFlag(TestPlatforms.tvOS) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS"))) || 30(platforms.HasFlag(TestPlatforms.MacCatalyst) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"))) || 31(platforms.HasFlag(TestPlatforms.LinuxBionic) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ANDROID_STORAGE"))) || 32(platforms.HasFlag(TestPlatforms.Android) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID"))) || 33(platforms.HasFlag(TestPlatforms.Browser) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"))) || 34(platforms.HasFlag(TestPlatforms.Wasi) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI"))) || 35(platforms.HasFlag(TestPlatforms.Haiku) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("HAIKU"))) || 36(platforms.HasFlag(TestPlatforms.Windows) && RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Microsoft.DotNet.XUnitV3Extensions (28)
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\LinuxOnlyFactAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\LinuxOnlyTheoryAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\MacOSOnlyFactAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\MacOSOnlyTheoryAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\UnixOnlyFactAttribute.cs (1)
22if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\UnixOnlyTheoryAttribute.cs (1)
22if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\WindowsFullFrameworkOnlyFactAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\WindowsFullFrameworkOnlyTheoryAttribute.cs (1)
23if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\WindowsOnlyFactAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\WindowsOnlyTheoryAttribute.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (18)
17public static bool IsRunningOnNetCoreApp { get; } = (Environment.Version.Major >= 5 || !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)); 18public static bool IsRunningOnNetFramework { get; } = RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase); 22(platforms.HasFlag(TestPlatforms.FreeBSD) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD"))) || 23(platforms.HasFlag(TestPlatforms.Linux) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) || 24(platforms.HasFlag(TestPlatforms.NetBSD) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"))) || 25(platforms.HasFlag(TestPlatforms.OSX) && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) || 26(platforms.HasFlag(TestPlatforms.illumos) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"))) || 27(platforms.HasFlag(TestPlatforms.Solaris) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"))) || 28(platforms.HasFlag(TestPlatforms.iOS) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) && !RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"))) || 29(platforms.HasFlag(TestPlatforms.tvOS) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS"))) || 30(platforms.HasFlag(TestPlatforms.MacCatalyst) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"))) || 31(platforms.HasFlag(TestPlatforms.LinuxBionic) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ANDROID_STORAGE"))) || 32(platforms.HasFlag(TestPlatforms.Android) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID"))) || 33(platforms.HasFlag(TestPlatforms.Browser) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"))) || 34(platforms.HasFlag(TestPlatforms.Wasi) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI"))) || 35(platforms.HasFlag(TestPlatforms.Haiku) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("HAIKU"))) || 36(platforms.HasFlag(TestPlatforms.Windows) && RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
534if (RuntimeInformation.FrameworkDescription.Contains(".NET Framework")) 770if (!RuntimeInformation.FrameworkDescription.Contains(".NET Framework"))
Microsoft.Extensions.AI.Evaluation.Console (12)
Telemetry\DeviceIdHelper.cs (8)
70if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 76else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 81else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 101if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 107else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 112else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 130if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 153if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Telemetry\TelemetryConstants.cs (1)
129RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME");
Telemetry\TelemetryHelper.cs (3)
53[TelemetryConstants.PropertyNames.KernelVersion] = RuntimeInformation.OSDescription, 54[TelemetryConstants.PropertyNames.RuntimeId] = RuntimeInformation.RuntimeIdentifier, 60_telemetryClient.Context.Device.OperatingSystem = RuntimeInformation.OSDescription;
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\WellKnownPaths.cs (1)
68var dotNetExeName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Microsoft.Extensions.ApiDescription.Client.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Extensions.DependencyModel (3)
EnvironmentWrapper.cs (1)
23RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
Resolution\DotNetReferenceAssembliesPathResolver.cs (2)
36RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 45RuntimeInformation.IsOSPlatform(OSPlatform.OSX) &&
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Linux\Resources\TestResources.cs (1)
39public readonly bool IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
Microsoft.Extensions.DotNetDeltaApplier (2)
ProcessUtilities.cs (1)
22Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
StartupHook.cs (1)
58if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.Extensions.Hosting (1)
HostingHostBuilderExtensions.cs (1)
226!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ||
Microsoft.Extensions.Hosting.WindowsServices (3)
WindowsServiceLifetimeHostBuilderExtensions.cs (3)
110Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 116Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 137Debug.Assert(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
Microsoft.Extensions.Logging.Console (1)
ConsoleLoggerProvider.cs (1)
82!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Microsoft.Maui.Controls.BindingSourceGen (1)
BindingCodeWriter.cs (1)
11 private static readonly string NewLine = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "\r\n" : "\n";
Microsoft.ML.CpuMath.UnitTests (3)
UnitTests.cs (3)
36public static bool IsNetCore => Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); 38public static bool SkipAvxSse => RuntimeInformation.ProcessArchitecture == Architecture.Arm || RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
Microsoft.ML.FastTree (2)
Dataset\IntArray.cs (2)
40public static bool UseFastTreeNative => RuntimeInformation.ProcessArchitecture == Architecture.X64 || RuntimeInformation.ProcessArchitecture == Architecture.X86;
Microsoft.ML.OneDal (2)
OneDalUtils.cs (2)
24System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.X64) 26if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.ML.Predictor.Tests (3)
TestPredictors.cs (3)
286if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 377if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // PR curves are only generated on Windows. 1678if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // PR curves are only generated on Windows.
Microsoft.ML.StandardTrainers (1)
Standard\LogisticRegression\LbfgsPredictorBase.cs (1)
452System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.X64)
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
93if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows))
Microsoft.ML.TestFramework (20)
Attributes\NotArm32FactAttribute.cs (1)
20return RuntimeInformation.ProcessArchitecture != Architecture.Arm;
Attributes\OnnxTheoryAttribute.cs (1)
23return (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
Attributes\TensorflowFactAttribute.cs (1)
24(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ||
Attributes\TensorflowTheoryAttribute.cs (1)
24(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ||
Attributes\TorchSharpFactAttribute.cs (1)
29(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ||
BaseTestBaseline.cs (10)
128if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 130if (RuntimeInformation.ProcessArchitecture == Architecture.X64) 132else if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64) 135if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 137if (RuntimeInformation.ProcessArchitecture == Architecture.X64) 139else if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64) 141else if (RuntimeInformation.ProcessArchitecture == Architecture.Arm) 146if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 148if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64) 164if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
BaseTestPredictorsMaml.cs (1)
202if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // -rp.txt files are not getting generated for Non-Windows Os
GlobalBase.cs (2)
30if (RuntimeInformation.ProcessArchitecture == Architecture.X64 || RuntimeInformation.ProcessArchitecture == Architecture.X86)
TestCommandBase.cs (2)
2056if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 2110if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
Microsoft.ML.TestFrameworkCommon (13)
Attributes\AttributeHelpers.cs (1)
16if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Attributes\NativeDependencyFactAttribute.cs (2)
23if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX) && System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.X64)
Attributes\NativeDependencyTheoryAttribute.cs (2)
23if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX) && System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.X64)
Attributes\OnnxFactAttribute.cs (1)
28(!RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
Attributes\X64FactAttribute.cs (1)
22return Environment.Is64BitProcess && System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.X64;
Attributes\X86X64FactAttribute.cs (2)
22return RuntimeInformation.ProcessArchitecture == Architecture.X86 || RuntimeInformation.ProcessArchitecture == Architecture.X64;
Utility\LibraryLoader.cs (3)
171if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 175else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Utility\NativeLibrary.cs (1)
22if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.ML.Tests (11)
DatabaseLoaderTests.cs (2)
43if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) //sqlite does not have built-in command for sleep 277if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
ExpressionLanguageTests\ExpressionLanguageTests.cs (1)
258if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
ImagesTests.cs (2)
23private static bool IsNotArm => RuntimeInformation.ProcessArchitecture != Architecture.Arm && RuntimeInformation.ProcessArchitecture != Architecture.Arm64;
TrainerEstimators\MatrixFactorizationTests.cs (6)
96if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 98if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64) 134if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 140else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 146else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 494int precision = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 5 : 3;
Microsoft.NET.Build.Tasks (19)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
FrameworkReferenceResolver.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
PrepareForReadyToRunCompilation.cs (2)
82return RuntimeInformation.IsOSPlatform(OSPlatform.Windows); 94return RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
ProcessFrameworkReferences.cs (1)
207!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) &&
ResolveReadyToRunCompilers.cs (11)
292if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 296if (RuntimeInformation.OSArchitecture == _targetArchitecture) 313if (RuntimeInformation.OSArchitecture == _targetArchitecture) 322if (RuntimeInformation.OSArchitecture != Architecture.X64) 346else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 350if (RuntimeInformation.OSArchitecture == _targetArchitecture) 355else if (RuntimeInformation.OSArchitecture == Architecture.X64) 372else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 375if (_targetArchitecture != Architecture.X64 || RuntimeInformation.OSArchitecture != Architecture.X64) 396if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 401else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
RunCsWinRTGenerator.cs (1)
196effectiveArchitecture ??= RuntimeInformation.ProcessArchitecture switch
WorkloadInstallType.cs (1)
36var architecture = RuntimeInformation.ProcessArchitecture.ToString();
Microsoft.NET.Build.Tests (40)
AppHostTests.cs (1)
162if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
ArtifactsOutputPathTests.cs (4)
515if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 545RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "hostfxr.dll" : 546RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? "libhostfxr.so" : 596var appBinaryName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
GivenFrameworkReferences.cs (1)
77RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
GivenThatWeWantAllResourcesInSatellite.cs (2)
38if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 60if (targetFramework == "net46" && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
GivenThatWeWantSatelliteAssembliesHaveassemblyVersion.cs (1)
26if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
GivenThatWeWantToBuildADesktopExe.cs (1)
527if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
GivenThatWeWantToBuildAnAppWithLibrariesAndRid.cs (3)
24var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier; 66var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier; 71if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs (1)
108if (targetFramework.StartsWith("net4") && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
GivenThatWeWantToBuildANetCoreApp.cs (3)
171var homePath = Environment.GetEnvironmentVariable(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME"); 267RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 292RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
GivenThatWeWantToFilterSatelliteAssemblies.cs (2)
21if (needsNetFrameworkReferenceAssemblies && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 87if (needsNetFrameworkReferenceAssemblies && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
GivenThatWeWantToGenerateADepsFileForATool.cs (2)
23if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 48if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
GivenThatWeWantToReferenceAnAssembly.cs (8)
34if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !dependencyProject.BuildsOnNonWindows) 101if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !dependencyProject.BuildsOnNonWindows) 233if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !dllDependencyProjectDependency.BuildsOnNonWindows) 371if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !dllDependencyProjectDependency.BuildsOnNonWindows) 447if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !dllDependencyProject.BuildsOnNonWindows) 532if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !dllDependencyProject.BuildsOnNonWindows) 682if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !dllDependencyProjectDependency.BuildsOnNonWindows) 838if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !dllDependencyProjectDependency.BuildsOnNonWindows)
GivenThatWeWantToReferenceAProject.cs (1)
80if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
GivenThatWeWantToResolveConflicts.cs (1)
357if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && frameworkReference != null && frameworkReference.StartsWith("Microsoft.WindowsDesktop", StringComparison.OrdinalIgnoreCase))
GivenThatWeWantToVerifyNuGetReferenceCompat.cs (2)
35if (!(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || referencerProject.BuildsOnNonWindows)) 61(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || dependencyProject.BuildsOnNonWindows))
GivenThatWeWantToVerifyProjectReferenceCompat.cs (1)
37if (!(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || referencerProject.BuildsOnNonWindows))
GiventThatWeWantDesignerSupport.cs (2)
28if (targetFramework == "netcoreapp3.0" && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 36&& !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
WorkloadTests.cs (2)
190var expectedProperty = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "WinTestWorkloadAutoImportPropsImported" : "UnixTestWorkloadAutoImportPropsImported"; 217var expectedProperty = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
Microsoft.NET.Pack.Tests (4)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
GivenThatThereAreImplicitPackageReferences.cs (2)
197if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 226if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.NET.Publish.Tests (92)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
FilesCopiedToPublishDirTests.cs (1)
80if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
GivenThatWeWantToCrossPublish.cs (1)
20RuntimeIdentifier = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "linux-x64" : "win-x64"
GivenThatWeWantToPreserveCompilationContext.cs (1)
24if (appTargetFramework == "net46" && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
GivenThatWeWantToPublishAFrameworkDependentApp.cs (3)
32RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 38var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier; 100var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier;
GivenThatWeWantToPublishAHelloWorldProject.cs (3)
346var libPrefix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "" : "lib"; 1166runCommand = runCommand.WithEnvironmentVariable($"DOTNET_ROOT_{RuntimeInformation.OSArchitecture.ToString().ToUpperInvariant()}", expectedRoot); 1171runCommand = runCommand.WithEnvironmentVariable($"DOTNET_ROOT_{RuntimeInformation.OSArchitecture.ToString().ToUpperInvariant()}", string.Empty);
GivenThatWeWantToPublishAnAotApp.cs (31)
16private readonly string RuntimeIdentifier = $"/p:RuntimeIdentifier={RuntimeInformation.RuntimeIdentifier}"; 28if (targetFramework == "net7.0" && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 41if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 84if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 130if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 181if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 260if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 277if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 326if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 353if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && (RuntimeInformation.OSArchitecture == Architecture.X64)) 383if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && (RuntimeInformation.OSArchitecture == Architecture.X64)) 427if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && (RuntimeInformation.OSArchitecture == Architecture.X64)) 455if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 476if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 500if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && RuntimeInformation.OSArchitecture == Architecture.X64) 524if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && RuntimeInformation.OSArchitecture == Architecture.X64) 615if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 713if (targetFramework == "net7.0" && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 872var staticLibSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".lib" : ".a"; 1191if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 1195if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 1199if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 1209if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 1213else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 1217else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 1228return RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
GivenThatWeWantToPublishAnAppWithLibrariesAndRid.cs (2)
89runtimeIdentifier = RuntimeInformation.RuntimeIdentifier; 101if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
GivenThatWeWantToPublishANetCoreAppForTelemetry.cs (4)
67if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.OSArchitecture != Architecture.X64) 97if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.OSArchitecture != Architecture.X64)
GivenThatWeWantToPublishAProjectWithDependencies.cs (1)
156var rid = RuntimeInformation.RuntimeIdentifier;
GivenThatWeWantToPublishASelfContainedApp.cs (3)
22var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier; 47var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier; 233var rid = RuntimeInformation.RuntimeIdentifier;
GivenThatWeWantToPublishASingleFileApp.cs (11)
35private readonly string RuntimeIdentifier = $"/p:RuntimeIdentifier={RuntimeInformation.RuntimeIdentifier}"; 81return RuntimeInformation.RuntimeIdentifier.StartsWith("win") ? baseName + ".dll" : 82RuntimeInformation.RuntimeIdentifier.StartsWith("osx") ? "lib" + baseName + ".dylib" : "lib" + baseName + ".so"; 88runtimeIdentifier: runtimeIdentifier ?? RuntimeInformation.RuntimeIdentifier); 429if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 444var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework, runtimeIdentifier: RuntimeInformation.RuntimeIdentifier); 446var niPdbFile = GivenThatWeWantToPublishReadyToRun.GetPDBFileName(mainProjectDll, framework, RuntimeInformation.RuntimeIdentifier); 459if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 548RuntimeIdentifier = RuntimeInformation.RuntimeIdentifier, 803if (targetFramework == "net6.0" && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 1176if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
GivenThatWeWantToPublishAToolProject.cs (3)
15RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "hostfxr.dll" : 16RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? "libhostfxr.so" : 61publishCommand.GetOutputDirectory(targetFramework: ToolsetInfo.CurrentTargetFramework, runtimeIdentifier: System.Runtime.InteropServices.RuntimeInformation.RuntimeIdentifier)
GivenThatWeWantToPublishReadyToRun.cs (13)
27RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 84if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 188$"/p:RuntimeIdentifier={RuntimeInformation.RuntimeIdentifier}") 216(RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.OSArchitecture != Architecture.X64)) 229(RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.OSArchitecture != Architecture.X64)) 242(RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.OSArchitecture != Architecture.X64)) 274if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 278if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 282if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 295string sdkArch = RuntimeInformation.ProcessArchitecture.ToString();
GivenThatWeWantToRunILLink.cs (7)
32RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 329RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 424RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 689RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) 868if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 975if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 1539RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
GivenThatWeWantToStoreAProjectWithDependencies.cs (4)
20var rid = RuntimeInformation.RuntimeIdentifier; 227if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 245var symbolFileExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "ni.pdb" : ".map"; 248if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
PublishItemsOutputGroupOutputsTests.cs (1)
80if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
PublishItemsOutputGroupTests.cs (1)
64if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (1)
BlazorLegacyIntegrationTest50.cs (1)
51if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.NET.Sdk.Publish.Tasks (2)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
Microsoft.NET.Sdk.Razor.Tasks (1)
ServerConnection.cs (1)
300var exeName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet";
Microsoft.NET.Sdk.Razor.Tests (2)
BuildIntegrationTest.cs (2)
70if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.NET.Sdk.StaticWebAssets.Tasks (3)
JSModules\ApplyJsModules.cs (1)
114if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Utils\OSPath.cs (2)
8public static StringComparer PathComparer { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) 12public static StringComparison PathComparison { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
Microsoft.NET.Sdk.StaticWebAssets.Tests (8)
StaticWebAssetsIntegrationTest.cs (8)
300ExecuteCommand(publish, "/p:PublishSingleFile=true", $"/p:RuntimeIdentifier={RuntimeInformation.RuntimeIdentifier}").Should().Pass(); 302var intermediateOutputPath = publish.GetIntermediateDirectory(DefaultTfm, "Debug", RuntimeInformation.RuntimeIdentifier).ToString(); 309AssertManifest(manifest, expectedManifest, runtimeIdentifier: RuntimeInformation.RuntimeIdentifier); 322runtimeIdentifier: RuntimeInformation.RuntimeIdentifier); 836ExecuteCommand(publish, "/p:PublishSingleFile=true", $"/p:RuntimeIdentifier={RuntimeInformation.RuntimeIdentifier}").Should().Pass(); 838var intermediateOutputPath = publish.GetIntermediateDirectory(DefaultTfm, "Debug", RuntimeInformation.RuntimeIdentifier).ToString(); 847runtimeIdentifier: RuntimeInformation.RuntimeIdentifier); 857AssertManifest(publishManifest, LoadPublishManifest(), runtimeIdentifier: RuntimeInformation.RuntimeIdentifier);
Microsoft.NET.Sdk.WorkloadManifestReader (3)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
WorkloadInstallType.cs (1)
36var architecture = RuntimeInformation.ProcessArchitecture.ToString();
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (1)
SdkDirectoryWorkloadManifestProviderTests.cs (1)
1318var installStateFolder = Path.Combine(_fakeDotnetRootDirectory ?? string.Empty, "metadata", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), featureBand, "InstallState");
Microsoft.NET.TestFramework (20)
Attributes\CoreMSBuildAndWindowsOnlyFactAttribute.cs (1)
10if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Attributes\CoreMSBuildAndWindowsOnlyTheoryAttribute.cs (1)
10if (TestContext.Current.ToolsetUnderTest.ShouldUseFullFrameworkMSBuild || !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Attributes\MacOsOnlyFactAttribute.cs (1)
10if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Attributes\PlatformSpecificFact.cs (4)
17(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !platforms.HasFlag(TestPlatforms.Windows)) 18|| (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !platforms.HasFlag(TestPlatforms.Linux)) 19|| (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && !platforms.HasFlag(TestPlatforms.OSX)) 20|| (RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD")) && !platforms.HasFlag(TestPlatforms.FreeBSD));
Attributes\WindowsOnlyRequiresMSBuildVersionFactAttribute.cs (1)
15if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Attributes\WindowsOnlyRequiresMSBuildVersionTheoryAttribute.cs (1)
10if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Commands\ComposeStoreCommand.cs (1)
37runtimeIdentifier = RuntimeInformation.RuntimeIdentifier;
EnvironmentInfo.cs (3)
18return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty; 24string rid = RuntimeInformation.RuntimeIdentifier; 33if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
FileConstants.cs (3)
8public static readonly string DynamicLibPrefix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "" : "lib"; 10public static readonly string DynamicLibSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".dll" : 11RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? ".dylib" : ".so";
Mock\FileSystemMockBuilder.cs (2)
76if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 271if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
ProjectConstruction\TestProject.cs (1)
533? (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty)
ToolsetInfo.cs (1)
371if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Microsoft.NET.ToolPack.Tests (2)
GivenThatWeWantToPackAToolProject.cs (2)
167var extension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : ""; 190if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.TestUtilities (3)
XUnit\OSSkipConditionAttribute.cs (3)
48if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 52else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 56else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\Devices\ComputerInfoTests.cs (1)
36RuntimeInformation.OSDescription.Should().Be(fullName);
MSBuild (1)
XMakeAttributes.cs (1)
431switch (RuntimeInformation.ProcessArchitecture)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
717[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.RuntimeInformation))]
MyFrontend (1)
Components_Layout_AppFooter_razor.g.cs (1)
146string Message = $"Powered by {RuntimeInformation.FrameworkDescription}";
netstandard (1)
netstandard.cs (1)
1724[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.RuntimeInformation))]
NonDISample (1)
Program.cs (1)
21if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
PrepareTests (1)
MinimizeUtil.cs (1)
316if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Roslyn.Test.PdbUtilities (1)
Reader\SymReaderFactory.cs (1)
42switch (RuntimeInformation.ProcessArchitecture)
RunTests (5)
HelixTestRunner.cs (2)
57var testOS = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? TestOS.Windows 58: RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? TestOS.Mac
Options.cs (1)
275var programName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet";
ProcessUtil.cs (1)
18if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Program.cs (1)
262if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
rzc (1)
ServerProtocol\ServerConnection.cs (1)
300var exeName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet";
sdk-tasks (2)
Crossgen.cs (1)
118private string GetCreateSymbols() => RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "--pdb" : "--perfmap";
DotNetTool.cs (1)
33protected override string ToolName => $"dotnet{(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty)}";
ServerComparison.TestSites (1)
Startup.cs (1)
25return ctx.Response.WriteAsync("Hello World " + RuntimeInformation.ProcessArchitecture);
Sockets.BindTests (1)
SocketTransportOptionsTests.cs (1)
90if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Swaggatherer (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System.Configuration.ConfigurationManager (1)
System\Configuration\ClientConfigPaths.cs (1)
115applicationPath = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
System.Data.Odbc (1)
System\Data\Odbc\OdbcConnection.cs (1)
566catch (DllNotFoundException e) when (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System.Drawing.Common.Tests (1)
System\Drawing\Imaging\MetafileTests.cs (1)
968if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System.Net.Security (1)
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
30(OperatingSystem.IsLinux() && RuntimeInformation.RuntimeIdentifier.StartsWith("linux-bionic-", StringComparison.OrdinalIgnoreCase));
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncEngine.Unix.cs (1)
53Architecture architecture = RuntimeInformation.ProcessArchitecture;
System.Private.Windows.Core.TestUtilities (2)
XUnit\SkipOnArchitectureAttribute.cs (2)
31if ((_testArchitectures.HasFlag(TestArchitectures.X86) && RuntimeInformation.ProcessArchitecture == Architecture.X86) 32|| (_testArchitectures.HasFlag(TestArchitectures.X64) && RuntimeInformation.ProcessArchitecture == Architecture.X64))
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
690[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.RuntimeInformation))]
System.Runtime.InteropServices.RuntimeInformation (1)
System.Runtime.InteropServices.RuntimeInformation.cs (1)
6[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.RuntimeInformation))]
System.Security.Cryptography (1)
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (1)
66RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
System.Security.Cryptography.Pkcs (1)
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (1)
66RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
System.Security.Cryptography.ProtectedData (1)
System\Security\Cryptography\ProtectedData.cs (1)
423if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Security\SecurityUtilsEx.cs (1)
178if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System.ServiceModel.NetNamedPipe (4)
System\ServiceModel\Channels\NamedPipeTransportBindingElement.cs (1)
19if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System\ServiceModel\NamedPipeTransportSecurity.cs (1)
21if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System\ServiceModel\NetNamedPipeBinding.cs (1)
22if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System\ServiceModel\NetNamedPipeSecurity.cs (1)
20if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System.ServiceModel.Primitives (9)
Internals\System\Runtime\Fx.cs (1)
46s_isUap = "Microsoft Windows".Equals(RuntimeInformation.OSDescription, StringComparison.Ordinal);
Internals\System\Runtime\IOThreadScheduler.cs (2)
443if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 548if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System\IdentityModel\Claims\ClaimComparer.cs (2)
317if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 355if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System\IdentityModel\Tokens\X509AsymmetricSecurityKey.cs (1)
42if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System\ServiceModel\Security\SecurityUtils.cs (1)
794if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System\ServiceModel\Security\X509CertificateInitiatorClientCredential.cs (1)
37return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
System\ServiceModel\Security\X509ServiceCertificateAuthentication.cs (1)
69RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
System.ServiceModel.UnixDomainSocket (3)
System\ServiceModel\UnixDomainSocketSecurity.cs (1)
14RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
System\ServiceModel\UnixDomainSocketTransportSecurity.cs (2)
140if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 165if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
System.ServiceModel.UnixDomainSocket.Tests (1)
ServiceModel\UnixDomainSocketSecurityTest.cs (1)
18UnixDomainSocketSecurityMode mode = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
System.Windows.Forms (2)
System\Windows\Forms\Printing\PrintDialog.cs (2)
239PRINTDLGW_64* dialogSettings = RuntimeInformation.ProcessArchitecture == Architecture.X86 295BOOL result = RuntimeInformation.ProcessArchitecture == Architecture.X86
System.Windows.Forms.Primitives (1)
Windows\Win32\PInvoke.PrintDlg.cs (1)
16Debug.Assert(RuntimeInformation.ProcessArchitecture == Architecture.X86);
System.Windows.Forms.Primitives.TestUtilities (4)
Extensions\AssertExtensions.cs (1)
15RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.Ordinal);
PlatformDetection.cs (2)
18public static bool IsArmProcess => RuntimeInformation.ProcessArchitecture == Architecture.Arm; 19public static bool IsArm64Process => RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
PlatformDetection.Windows.cs (1)
12public static bool IsNetFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase);
System.Windows.Forms.Tests (7)
System\Windows\Forms\AxHost.VisualBasic6Tests.cs (1)
15if (RuntimeInformation.ProcessArchitecture != Architecture.X86)
System\Windows\Forms\CheckBoxRendererTests.cs (1)
51&& RuntimeInformation.ProcessArchitecture == Architecture.X86)
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (1)
211if (RuntimeInformation.ProcessArchitecture != Architecture.X86)
System\Windows\Forms\DataGridViewTests.cs (1)
1917&& columnHeadersVisible && RuntimeInformation.ProcessArchitecture == Architecture.X86)
System\Windows\Forms\RadioButtonRendererTests.cs (1)
110if (RuntimeInformation.ProcessArchitecture == Architecture.X86 && focus)
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (1)
366if (insideTreeView && isHovered && expected && RuntimeInformation.ProcessArchitecture == Architecture.X64)
TestResources\ComClasses.cs (1)
12= RuntimeInformation.ProcessArchitecture == Architecture.X86
Templates.Blazor.Tests (5)
BlazorTemplateTest.cs (1)
81error = !isRequired ? null : $"Browser '{browserKind}' is required but not configured on '{RuntimeInformation.OSDescription}'";
src\ProjectTemplates\Shared\Project.cs (1)
392switch (RuntimeInformation.ProcessArchitecture)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
639if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 667if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Templates.Blazor.WebAssembly.Auth.Tests (7)
src\ProjectTemplates\Shared\Project.cs (1)
392switch (RuntimeInformation.ProcessArchitecture)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
639if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 667if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\E2ETesting\BrowserFixture.cs (2)
39RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && RuntimeInformation.ProcessArchitecture == Architecture.X64,
src\Shared\E2ETesting\SauceConnectServer.cs (1)
92if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Templates.Blazor.WebAssembly.Tests (7)
src\ProjectTemplates\Shared\Project.cs (1)
392switch (RuntimeInformation.ProcessArchitecture)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
639if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 667if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\E2ETesting\BrowserFixture.cs (2)
39RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && RuntimeInformation.ProcessArchitecture == Architecture.X64,
src\Shared\E2ETesting\SauceConnectServer.cs (1)
92if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Templates.Mvc.Tests (7)
src\ProjectTemplates\Shared\Project.cs (1)
392switch (RuntimeInformation.ProcessArchitecture)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
639if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 667if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\E2ETesting\BrowserFixture.cs (2)
39RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && RuntimeInformation.ProcessArchitecture == Architecture.X64,
src\Shared\E2ETesting\SauceConnectServer.cs (1)
92if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Templates.Tests (8)
GrpcTemplateTest.cs (1)
98var isWindowsOld = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version < new Version(6, 2);
src\ProjectTemplates\Shared\Project.cs (1)
392switch (RuntimeInformation.ProcessArchitecture)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
639if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 667if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
src\Shared\E2ETesting\BrowserFixture.cs (2)
39RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && RuntimeInformation.ProcessArchitecture == Architecture.X64,
src\Shared\E2ETesting\SauceConnectServer.cs (1)
92if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
59if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
WinFormsControlsTest (2)
MainForm.cs (1)
41Text = RuntimeInformation.FrameworkDescription;
MdiParent.cs (1)
17Text = RuntimeInformation.FrameworkDescription;
xunit.console (5)
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\Native\PlatformApis.cs (3)
145if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 149if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) 153if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
common\ConsoleHelper.cs (1)
15if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows))
ConsoleRunner.cs (1)
180var platform = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;