175 instantiations of Process
aspire (1)
DotNet\DotNetSdkInstaller.cs (1)
47using var process = new Process { StartInfo = _createProcessStartInfo(dotnetPath, arguments) };
aspire-managed (2)
Program.cs (1)
41using var process = new Process { StartInfo = startInfo };
TerminalHostForwarder.cs (1)
54using var process = new Process { StartInfo = startInfo };
Aspire.Acquisition.Tests (1)
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
227return new Process
Aspire.Cli.EndToEnd.Tests (2)
Helpers\LocalDeploymentTestHelpers.cs (1)
74using var process = new Process
KubernetesPublishTests.cs (1)
298using var cleanupProcess = new System.Diagnostics.Process();
Aspire.Cli.Tests (3)
Telemetry\InternalMicrosoftDetectorTests.cs (1)
1032using var process = new Process { StartInfo = startInfo };
tests\Shared\Processes\ProcessTestFixture.cs (1)
189using var process = new Process
tests\Shared\TemporaryWorkspaceGitExtensions.cs (1)
33using var process = new Process
Aspire.Deployment.EndToEnd.Tests (54)
AcaCompactNamingDeploymentTests.cs (1)
344var process = new System.Diagnostics.Process
AcaCompactNamingUpgradeDeploymentTests.cs (1)
400var process = new System.Diagnostics.Process
AcaCustomRegistryDeploymentTests.cs (1)
230var process = new System.Diagnostics.Process
AcaDeploymentErrorOutputTests.cs (1)
182var process = new System.Diagnostics.Process
AcaExistingRegistryDeploymentTests.cs (1)
266var process = new System.Diagnostics.Process
AcaExpressDeploymentTests.cs (1)
408using var process = new Process
AcaManagedRedisDeploymentTests.cs (1)
267var process = new System.Diagnostics.Process
AcrPurgeTaskDeploymentTests.cs (1)
263var process = new System.Diagnostics.Process
AksAzureKubernetesEnvironmentCertManagerDeploymentTests.cs (1)
419using var process = new System.Diagnostics.Process
AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.cs (1)
408using var process = new System.Diagnostics.Process
AksAzureKubernetesEnvironmentGatewayDeploymentTests.cs (1)
321using var process = new System.Diagnostics.Process
AksBlazorRedisDeploymentTests.cs (1)
252using var process = new System.Diagnostics.Process
AksCrossResourceGroupRegistryDeploymentTests.cs (1)
402using var process = new Process
AksMultipleNodePoolsDeploymentTests.cs (1)
276using var process = new System.Diagnostics.Process
AksPersistentVolumeDeploymentTests.cs (1)
535using var process = new System.Diagnostics.Process
AksStarterDeploymentTests.cs (1)
419var process = new System.Diagnostics.Process
AksStarterWithRedisHelmDeploymentTests.cs (1)
395var process = new System.Diagnostics.Process
AksVnetInfraDeploymentTests.cs (1)
206using var process = new System.Diagnostics.Process
AksVnetWithAzureResourcesDeploymentTests.cs (1)
356using var process = new System.Diagnostics.Process
AksWithAzureResourcesDeploymentTests.cs (1)
337using var process = new System.Diagnostics.Process
AksWithHelmChartDeploymentTests.cs (1)
273using var process = new System.Diagnostics.Process
AppServicePythonDeploymentTests.cs (1)
215var process = new System.Diagnostics.Process
AppServiceReactDeploymentTests.cs (1)
487using var process = new System.Diagnostics.Process
AppServiceStoragePrivateEndpointDeploymentTests.cs (1)
388using var process = new System.Diagnostics.Process
AzureAppConfigDeploymentTests.cs (1)
182var process = new System.Diagnostics.Process
AzureConnectorNamespaceDeploymentTests.cs (1)
285using var process = new System.Diagnostics.Process
AzureContainerRegistryDeploymentTests.cs (1)
165var process = new System.Diagnostics.Process
AzureEventHubsDeploymentTests.cs (1)
182var process = new System.Diagnostics.Process
AzureKeyVaultDeploymentTests.cs (1)
182var process = new System.Diagnostics.Process
AzureLogAnalyticsDeploymentTests.cs (1)
165var process = new System.Diagnostics.Process
AzureResourceScopeDeploymentTests.cs (1)
233var process = new System.Diagnostics.Process
AzureRoleAssignmentRunModeTests.cs (1)
244using var process = new System.Diagnostics.Process
AzureServiceBusDeploymentTests.cs (1)
184var process = new System.Diagnostics.Process
AzureStorageDeploymentTests.cs (1)
390var process = new System.Diagnostics.Process
AzureStorageRunModeTests.cs (1)
227using var process = new System.Diagnostics.Process
FoundryHostedAgentDeploymentTests.cs (1)
701var process = new System.Diagnostics.Process
FrontDoorDeploymentTests.cs (1)
234var process = new System.Diagnostics.Process
Helpers\DeploymentE2ETestHelpers.cs (1)
147using var process = new Process
Helpers\DotnetProjectDeploymentHelpers.cs (1)
105using var process = new Process
KubernetesGatewayTlsDeploymentTests.cs (1)
467var process = new System.Diagnostics.Process
KubernetesHelmChartDeploymentTests.cs (1)
317using var process = new System.Diagnostics.Process
NspStorageKeyVaultDeploymentTests.cs (1)
346var process = new System.Diagnostics.Process
PythonFastApiDeploymentTests.cs (1)
217var process = new System.Diagnostics.Process
RadiusStarterDeploymentTests.cs (1)
670using var process = new System.Diagnostics.Process
TypeScriptAzureContainerAppJobDeploymentTests.cs (1)
174using var process = new System.Diagnostics.Process
TypeScriptExpressDeploymentTests.cs (1)
204var process = new System.Diagnostics.Process
TypeScriptJavaScriptHostingDeploymentTests.cs (1)
207using var process = new System.Diagnostics.Process
TypeScriptVnetSqlServerInfraDeploymentTests.cs (1)
272var process = new System.Diagnostics.Process
VnetKeyVaultConnectivityDeploymentTests.cs (1)
258var process = new System.Diagnostics.Process
VnetKeyVaultInfraDeploymentTests.cs (1)
193var process = new System.Diagnostics.Process
VnetSqlServerConnectivityDeploymentTests.cs (1)
325var process = new System.Diagnostics.Process
VnetSqlServerInfraDeploymentTests.cs (1)
194var process = new System.Diagnostics.Process
VnetStorageBlobConnectivityDeploymentTests.cs (1)
265var process = new System.Diagnostics.Process
VnetStorageBlobInfraDeploymentTests.cs (1)
195var process = new System.Diagnostics.Process
Aspire.EndToEnd.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
178AppHostProcess = new Process();
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
227return new Process
Aspire.Hosting (1)
Dcp\Process\ProcessUtil.cs (1)
40var process = new System.Diagnostics.Process()
Aspire.Hosting.Azure (1)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
40var process = new System.Diagnostics.Process()
Aspire.Hosting.Azure.Tests (1)
FoundryExtensionsTests.cs (1)
236using var process = new Process
Aspire.Hosting.CodeGeneration.Go.Tests (7)
AtsGoCodeGeneratorTests.cs (4)
103using var process = new Process 143using var process = new Process(); 1557using var process = new Process(); 1729using var process = new Process();
AtsGoDerivedBuilderTests.cs (1)
416using var process = new Process();
GoDocCommentTests.cs (1)
292using var process = new Process();
GoScaffoldTests.cs (1)
243using var process = new Process();
Aspire.Hosting.CodeGeneration.Java.Tests (1)
AtsJavaCodeGeneratorTests.cs (1)
3875using var process = new Process { StartInfo = startInfo };
Aspire.Hosting.CodeGeneration.Python.Tests (1)
AtsPythonCodeGeneratorTests.cs (1)
771using var process = new Process();
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
AtsRustCodeGeneratorTests.cs (1)
111using var process = new Process
Aspire.Hosting.DevTunnels (1)
DevTunnelCli.cs (1)
250using var process = new Process
Aspire.Hosting.Docker (1)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
40var process = new System.Diagnostics.Process()
Aspire.Hosting.Dotnet (1)
DotnetProjectRunPropertiesResolver.cs (1)
74using var process = new Process { StartInfo = startInfo };
Aspire.Hosting.Foundry (2)
FoundryLocalService.cs (2)
271var process = new Process 377using var process = new Process
Aspire.Hosting.Kubernetes (1)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
40var process = new System.Diagnostics.Process()
Aspire.Hosting.Maui (1)
Lifecycle\MauiBuildQueueEventSubscriber.cs (1)
219using var process = new Process { StartInfo = psi };
Aspire.Hosting.Radius (6)
Publishing\RadCredentialRegisterStep.cs (1)
257using var process = new Process();
Publishing\RadiusDeploymentPipelineStep.cs (3)
328using var process = new Process(); 457using var process = new Process(); 551using var process = new Process();
Publishing\SealedSecretApplyStep.cs (2)
698using var process = new Process 754using var process = new Process
Aspire.Hosting.RemoteHost.Tests (3)
CapabilityDispatcherTests.cs (1)
36using var process = new Process
tests\Shared\Processes\ProcessTestFixture.cs (1)
189using var process = new Process
TestServices\IntegrationHostProcessFixture.cs (1)
102using var process = new Process
Aspire.Hosting.Rust (1)
CargoMetadataReader.cs (1)
84using var process = new Process { StartInfo = startInfo };
Aspire.Hosting.Tasks (1)
RunAspireCliCommand.cs (1)
85using var process = new Process
Aspire.Hosting.Tests (2)
MSBuildTests.cs (2)
405using var process = new Process(); 1743using var process = new Process();
Aspire.Templates.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
178AppHostProcess = new Process();
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
227return new Process
Aspire.TestTools (2)
GitHubCli.cs (2)
261using var process = new Process 311using var process = new Process
dotnet-aot (1)
parent\dotnet\CommandFactory\CommandFactoryUsingResolver.cs (1)
118var _process = new Process
dotnet-format (1)
Utilities\ProcessRunner.cs (1)
77var process = new Process();
dotnet-suggest (1)
SuggestionStore.cs (1)
38using (var process = new Process
dotnet-svcutil-lib (1)
Shared\Utilities\ProcessRunner.cs (1)
68using (var proc = new Process())
dotnet-user-jwts (2)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (2)
84using var process = new Process() 168using var process = new Process()
dotnet-user-secrets (2)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (2)
84using var process = new Process() 168using var process = new Process()
Infrastructure.Tests (20)
CreateFailingTestIssue\CreateFailingTestIssueFixture.cs (1)
42using var process = new Process { StartInfo = processStartInfo };
CreateFailingTestIssue\CreateFailingTestIssueToolTests.cs (1)
647using var process = new Process { StartInfo = processStartInfo };
DownloadFailingJobLogs\DownloadFailingJobLogsToolTests.cs (1)
103using var process = new Process { StartInfo = processStartInfo };
ExtractTestPartitions\ExtractTestPartitionsFixture.cs (1)
32using var process = new Process { StartInfo = psi };
ExtractTestPartitions\ExtractTestPartitionsTests.cs (1)
314using var process = new Process { StartInfo = psi };
GenerateTestSummary\GenerateTestSummaryFixture.cs (1)
35using var process = new Process { StartInfo = processStartInfo };
GenerateTestSummary\GenerateTestSummaryToolTests.cs (1)
264using var process = new Process { StartInfo = processStartInfo };
Pipelines\NixCliPackageTests.cs (1)
161using var process = new System.Diagnostics.Process();
PowerShellScripts\PowerShellCommand.cs (1)
215return new Process
Shared\ProcessRunner.cs (1)
18using var process = new Process();
WorkflowScripts\AnalyzeCiFailureWorkflowTests.cs (2)
4706using var process = new Process(); 4862using var process = new Process();
WorkflowScripts\DeploymentTestScriptTests.cs (1)
89using var process = new Process();
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (2)
260using var process = new Process(); 428using var process = new Process();
WorkflowScripts\ExtensionReleaseWorkflowTests.cs (3)
401using var process = new Process(); 434using var process = new Process(); 508using var process = new Process();
WorkflowScripts\MtpExitCodeScriptTests.cs (1)
53using var process = new Process();
WorkflowScripts\NodeCommand.cs (1)
200return new Process
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
55using var process = new Process
Microsoft.Arcade.Common (1)
Command.cs (1)
43_process = new Process()
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
381 using (var launchBrowser = new Process())
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
381 using (var launchBrowser = new Process())
Microsoft.AspNetCore.Server.IntegrationTesting (6)
ApplicationPublisher.cs (1)
74var hostProcess = new Process() { StartInfo = startInfo };
Deployers\NginxDeployer.cs (3)
114using (var process = new Process 169using (var runNginx = new Process() { StartInfo = startInfo }) 211using (var runNginx = new Process() { StartInfo = startInfo })
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
247using (var runScriptsOnRemoteServerProcess = new Process() { StartInfo = startInfo })
Deployers\SelfHostDeployer.cs (1)
145HostProcess = new Process() { StartInfo = startInfo };
Microsoft.Build.Utilities.Core (1)
ToolTask.cs (1)
782proc = new Process();
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
170using var process = new Process { StartInfo = startInfo };
Microsoft.DotNet.Cli.InternalMicrosoft (1)
Internal\InternalMicrosoftDetectionContext.cs (1)
197using var process = new Process
Microsoft.DotNet.Cli.Utils (2)
Extensions\ProcessStartInfoExtensions.cs (2)
14var process = new Process 37var process = new Process
Microsoft.DotNet.HotReload.Watch (1)
Process\ProcessRunner.cs (1)
144var process = new Process
Microsoft.DotNet.MacOsPkg.Core (1)
ExecuteHelper.cs (1)
23using (Process process = new Process { StartInfo = processStartInfo })
Microsoft.Extensions.AI.Templates.Tests (1)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
55using var process = new Process
Microsoft.Extensions.DataIngestion.MarkItDown (1)
MarkItDownReader.cs (1)
75using (Process process = new() { StartInfo = startInfo })
Microsoft.Extensions.DataIngestion.Tests (1)
Readers\MarkItDownConditionHelper.cs (1)
30using Process process = new() { StartInfo = startInfo };
Microsoft.ML.CodeGenerator (3)
Utils.cs (3)
195var proc = new System.Diagnostics.Process(); 221var proc = new System.Diagnostics.Process(); 242var proc = new System.Diagnostics.Process();
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
226var p = new System.Diagnostics.Process
Microsoft.NET.Build.Containers (2)
LocalDaemons\ContainerRuntimes.cs (1)
141Process process = new()
LocalDaemons\DockerCli.cs (1)
203Process proc = new()
Microsoft.NET.ProjectData (1)
Donor\ProjectDataDonorIndex.Git.cs (1)
117 using Process process = new()
Microsoft.NET.Sdk.Publish.Tasks (1)
Tasks\GenerateEFSQLScripts.cs (1)
106proc = new Process
Microsoft.TestPlatform.Build (1)
Tasks\VSTestTask.cs (1)
87using var activeProcess = new Process { StartInfo = processInfo };
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
ProcessCodeMethods.cs (1)
139Process ps = new();
Microsoft.TestPlatform.PlatformAbstractions (1)
common\System\ProcessHelper.cs (1)
56var process = new Process();
NativeIntegrations.DockerCompose (1)
DockerCommand.cs (1)
20using var process = new Process
NuGet.Build.Tasks (1)
StaticGraphRestoreTaskBase.cs (1)
117using (var process = new Process())
NuGet.Common (1)
Migrations\Migration1.cs (1)
201using (var proc = new Process())
NuGet.Protocol (1)
Plugins\PluginProcess.cs (1)
87_process = new Process();
PresentationUI (2)
InstallationError.xaml.cs (1)
211Process Notepad = new Process();
TenFeetInstallationError.xaml.cs (1)
215Process Notepad = new Process();
System.Diagnostics.Process (7)
System\Diagnostics\Process.cs (6)
1002return new Process(machineName, isRemoteMachine, processId, null); 1019return new Process(".", false, processId, null); 1038process = new Process(".", false, processId, null); 1126processes[i] = new Process(machineName, isRemoteMachine, processInfo.ProcessId, processInfo); 1141return new Process(".", false, Environment.ProcessId, null); 1567Process process = new Process();
System\Runtime\InteropServices\UnixProcessStartArguments.cs (1)
119Process process = new();
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
48return new Process() { StartInfo = psi };
1489 references to Process
aspire (105)
Acquisition\PeerInstallProbe.cs (3)
20/// Uses <see cref="Process"/> directly rather than the project's 22/// semantics await <see cref="Process.WaitForExitAsync(CancellationToken)"/> 327private static async Task<PeerProcessOutput> CapturePeerOutputAsync(Process process, CancellationToken cancellationToken)
Agents\ClaudeCode\ClaudeCodeCliRunner.cs (1)
30var result = await Process.RunAndCaptureTextAsync(new ProcessStartInfo(executablePath, "--version")
Agents\Copilot\CopilotCliRunner.cs (1)
30var result = await Process.RunAndCaptureTextAsync(new ProcessStartInfo(executablePath, "--version")
Agents\OpenCode\OpenCodeCliRunner.cs (1)
30var result = await Process.RunAndCaptureTextAsync(new ProcessStartInfo(executablePath, "--version")
Agents\Playwright\PlaywrightCliRunner.cs (2)
27var result = await Process.RunAndCaptureTextAsync(new ProcessStartInfo(executablePath, "--version") 89var result = await Process.RunAndCaptureTextAsync(startInfo, cancellationToken).ConfigureAwait(false);
Agents\VsCode\VsCodeCliRunner.cs (1)
31var result = await Process.RunAndCaptureTextAsync(new ProcessStartInfo(executablePath, "--version")
Certificates\CertificateGeneration\MacOSCertificateManager.cs (7)
116var exitStatus = Process.Run(new ProcessStartInfo(MacOSTrustCertificateCommandLine, s_macOSTrustCertificateCommandLineArguments + tmpFile)); 188var checkTrustProcessOutput = Process.Run(checkTrustProcessStartInfo); 234var processExitStatus = Process.Run(processInfo); 275var processOutput = Process.RunAndCaptureText(processInfo); 304using var findCertificateProcess = Process.Start(new ProcessStartInfo( 372var processOutput = Process.RunAndCaptureText(processInfo);
Certificates\CertificateGeneration\UnixCertificateManager.cs (5)
675return Process.Run( 754using var process = Process.Start(startInfo)!; 845var processOutput = Process.RunAndCaptureText(processInfo); 886var processOutput = Process.RunAndCaptureText(processInfo);
Certificates\CertificateHelpers.cs (1)
125var result = Process.RunAndCaptureText(processInfo, TimeSpan.FromSeconds(5));
Commands\AppHostFollowDisconnectHelpers.cs (2)
28using var process = Process.GetProcessById(pid);
Commands\UpdateCommand.cs (1)
1031var result = await Process.RunAndCaptureTextAsync(exePath, ["--version"], cancellationToken);
DotNet\DotNetSdkInstaller.cs (1)
47using var process = new Process { StartInfo = _createProcessStartInfo(dotnetPath, arguments) };
Git\GitRepository.cs (1)
140var result = await Process.RunAndCaptureTextAsync(startInfo, cancellationToken).ConfigureAwait(false);
Npm\NpmRunner.cs (1)
282var result = await Process.RunAndCaptureTextAsync(startInfo, cancellationToken).ConfigureAwait(false);
OpenCode\OpenCodeCliRunner.cs (1)
23var result = await Process.RunAndCaptureTextAsync(new ProcessStartInfo("opencode", "--version")
Processes\ProcessTreeGracefulShutdownService.cs (5)
253using var process = TryGetRunningProcess(target); 286using var process = TryGetRunningProcess(target); 365using var runningProcess = TryGetRunningProcess(process); 382private Process? TryGetRunningProcess(ProcessTarget target) 394using var process = TryGetRunningProcess(target);
Processes\WindowsProcessInterop.cs (1)
9/// Win32 interop that <see cref="System.Diagnostics.Process"/> does not expose.
Program.cs (2)
1417using var currentProcess = Process.GetCurrentProcess();
Projects\RunningInstanceManager.cs (2)
135var process = Process.GetProcessById(pid);
src\Aspire.Hosting\Backchannel\BackchannelDataTypes.cs (2)
1503/// Gets or sets when the AppHost process started using the legacy <see cref="Process.StartTime"/> clock domain. 1528/// <see cref="Process.StartTime"/> for released-AppHost compatibility. On Linux it drifts across
src\Shared\BackchannelConstants.cs (2)
417using var process = Process.GetProcessById(pid);
src\Shared\BundleVersionLease.cs (2)
213using var process = Process.GetCurrentProcess();
src\Shared\ChildProcess.cs (18)
35private Process? _process; 103protected Process Process => 112Process process; 156process = Process.Start(startInfo) 178private static DateTimeOffset? GetStartTime(Process process) 195/// Reading the pipes directly, unlike <see cref="Process.BeginOutputReadLine"/>, means 196/// <see cref="Process.WaitForExitAsync"/> does not 200private async Task ReadOutputAsync(Process process) 247var process = Process; 256var process = Process; 307private int GetExitCode(Process process) 326private async Task ShutdownOnCancelAsync(Process process) 346private async Task ShutdownLadderAsync(Process process, Func<int, CancellationToken, Task> requestShutdown, CancellationToken gracefulToken) 404private static void KillOwnedProcess(Process process, bool entireProcessTree) 418private async Task VerifyContainedTerminationAsync(Process process) 465private void RequestGroupTermination(Process process) 496private void ForceKillChild(Process process) 554Process? process;
src\Shared\ContainerRuntimeProbe.cs (6)
141using var process = Process.Start(startInfo); 275using var process = Process.Start(startInfo); 371using var process = Process.Start(startInfo);
src\Shared\ProcessSignaler.cs (9)
16using var process = TryGetRunningProcess(pid, expectedStartTime, logger); 27using var process = TryGetRunningProcessWithRuntimeStartTime(pid, expectedStartTime, tolerance, logger); 52using var process = TryGetRunningProcess(pid, expectedStartTime, logger); 67public static Process? TryGetRunningProcess(int pid, DateTimeOffset? expectedStartTime, ILogger logger) 69Process? process = null; 72process = Process.GetProcessById(pid); 130public static Process? TryGetRunningProcessWithRuntimeStartTime(int pid, DateTimeOffset expectedStartTime, TimeSpan tolerance, ILogger logger) 132Process? process = null; 135process = Process.GetProcessById(pid);
src\Shared\ProcessStartTimeHelper.cs (17)
21/// The tolerance legacy callers apply when comparing a <see cref="Process.StartTime"/>-derived 48/// Gets the current process's start time as reported by <see cref="Process.StartTime"/>. 52using var process = Process.GetCurrentProcess(); 67using var process = Process.GetCurrentProcess(); 81/// using <see cref="Process.StartTime"/>. 88using var process = Process.GetProcessById(pid); 110using var process = Process.GetProcessById(pid); 168using var process = Process.GetProcessById(pid); 220/// <see cref="Process.StartTime"/>. Cross-process callers should pass a one-second 221/// <paramref name="tolerance"/> because on Linux <see cref="Process.StartTime"/> is reconstructed from 237using var process = Process.GetProcessById(pid);
Telemetry\AgentTelemetryUploader.cs (1)
68Process.StartAndForget(startInfo);
Utils\EnvironmentChecker\DeprecatedWorkloadCheck.cs (1)
22private readonly Func<ProcessStartInfo, CancellationToken, Task<ProcessTextOutput>> _runProcess = Process.RunAndCaptureTextAsync;
Utils\EnvironmentChecker\TypeScriptAppHostToolingCheck.cs (1)
241var result = await Process.RunAndCaptureTextAsync(
Utils\ProcessCaptureRunner.cs (7)
33Func<Process, CancellationToken, Task<TCapture>> captureAsync, 43Process process; 46var started = Process.Start(startInfo); 179private static void TryKillProcessTree(Process process, ILogger logger) 194private static async Task SwallowExitWaitAsync(Process process, TimeSpan bound, ILogger logger) 217private static int TryGetPid(Process process)
aspire-managed (21)
Program.cs (1)
41using var process = new Process { StartInfo = startInfo };
src\Shared\BundleVersionLease.cs (2)
213using var process = Process.GetCurrentProcess();
src\Shared\ProcessStartTimeHelper.cs (17)
21/// The tolerance legacy callers apply when comparing a <see cref="Process.StartTime"/>-derived 48/// Gets the current process's start time as reported by <see cref="Process.StartTime"/>. 52using var process = Process.GetCurrentProcess(); 67using var process = Process.GetCurrentProcess(); 81/// using <see cref="Process.StartTime"/>. 88using var process = Process.GetProcessById(pid); 110using var process = Process.GetProcessById(pid); 168using var process = Process.GetProcessById(pid); 220/// <see cref="Process.StartTime"/>. Cross-process callers should pass a one-second 221/// <paramref name="tolerance"/> because on Linux <see cref="Process.StartTime"/> is reconstructed from 237using var process = Process.GetProcessById(pid);
TerminalHostForwarder.cs (1)
54using var process = new Process { StartInfo = startInfo };
aspire-tray (17)
FolderApplication.cs (2)
145using var process = Process.Start(start) ?? throw new InvalidOperationException("Windows could not start the selected application.");
src\Aspire.Tray\Common\CliAppHostClient.cs (2)
106using var process = Process.Start(CreateWatchStartInfo(_cliPath))
src\Aspire.Tray\Common\CliAppHostCommands.cs (4)
60Process process; 63process = Process.Start(startInfo) ?? throw new InvalidOperationException("Could not start the Aspire CLI."); 110using var process = Process.Start(CreateStopStartInfo(cliPath, target))
src\Aspire.Tray\Common\CliProcess.cs (1)
42public static async Task TerminateOwnedChildAsync(Process process)
src\Aspire.Tray\Common\TrayActivation.cs (2)
42using var process = Process.GetCurrentProcess();
src\Aspire.Tray\Common\TrayProcessIdentity.cs (2)
12Process process; 15process = Process.GetProcessById(ProcessId);
src\Aspire.Tray\Common\WindowsLoginBootstrap.cs (2)
29using var process = Process.Start(CreateStartInfo(cliPath))
src\Shared\BundleVersionLease.cs (2)
213using var process = Process.GetCurrentProcess();
Aspire.Acquisition.Tests (2)
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
19public Process? CurrentProcess { get; private set; } 208private Process CreateProcess(string executable, string args)
Aspire.Cli.EndToEnd.Tests (8)
Helpers\CliE2ETestHelpers.cs (4)
505using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start docker build process."); 555using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start docker build process.");
Helpers\GitHttpServer.cs (2)
64using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Could not start the Git HTTP backend.");
Helpers\LocalDeploymentTestHelpers.cs (1)
74using var process = new Process
KubernetesPublishTests.cs (1)
298using var cleanupProcess = new System.Diagnostics.Process();
Aspire.Cli.Tests (113)
Acquisition\PeerInstallProbeTests.cs (4)
399using var process = await WaitForProcessIdAsync(pidFile, TestContext.Current.CancellationToken); 427private static async Task<Process> WaitForProcessIdAsync(string pidFile, CancellationToken cancellationToken) 436return Process.GetProcessById(pid); 444private static async Task WaitForExitAsync(Process process, CancellationToken cancellationToken)
Agents\TelemetryHookScriptTests.cs (2)
669using var process = Process.Start(psi)!;
Backchannel\AuxiliaryBackchannelMonitorTests.cs (2)
812using var process = Process.Start(startInfo);
Backchannel\OrphanedAppHostCollectorTests.cs (4)
145using var cliProcess = TestProcesses.StartLongRunning(); 173using var cliProcess = Process.Start(psi); 400private static DateTimeOffset GetProcessStartTime(Process process)
Commands\AppHostLauncherTests.cs (12)
617Process? startedProcess = null; 618Process? detachedHandle = null; 619Process? forkProcess = null; 622startedProcess = Process.Start(new ProcessStartInfo 630detachedHandle = Process.GetProcessById(startedProcess.Id); 632forkProcess = Process.Start(new ProcessStartInfo 773var startedProcess = harness.ProcessFactory.StartedProcess ?? throw new InvalidOperationException("Expected child process to start."); 1449public Process? StartedProcess { get; private set; } 1514StartedProcess = Process.Start(CreateProcessStartInfo(workingDirectory)) ?? throw new InvalidOperationException("Failed to start test child process."); 1628private sealed class MonitoredProcessExecutionAdapter(Process process, Process? exitMonitorProcess = null, DateTimeOffset? startTime = null, bool useSuppliedStartTime = false) : IProcessExecution 1684private static DateTimeOffset? GetStartTime(Process process)
Commands\CompletionScriptTests.cs (2)
324using var process = Process.Start(startInfo)!;
Commands\RunCommandTests.cs (3)
916using var launcher = TestProcesses.StartLongRunning(); 1020using var launcher = TestProcesses.StartLongRunning(); 5481private static long GetProcessStartTimeUnixMilliseconds(Process process)
Configuration\ConfigSourceServiceGitTests.cs (3)
228Process? child = null; 232child = Process.GetProcessById(pid); 738var result = await System.Diagnostics.Process.RunAndCaptureTextAsync(new("git", arguments)
DotNet\DotNetCliRunnerTests.cs (4)
466using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Could not start dotnet."); 2739using var process = Process.Start(processStartInfo) ?? throw new InvalidOperationException("Failed to start dotnet msbuild.");
DotNet\ProcessExecutionTests.cs (1)
289return await Process.RunAndCaptureTextAsync(startInfo, timeout.Token);
Npm\AspireJsLauncherTests.cs (2)
377using var process = Process.Start(psi)!;
Processes\LauncherLivenessMonitorTests.cs (5)
31using var launcher = StartLongRunningProcess(); 77using var launcher = StartLongRunningProcess(); 95private static IConfiguration CreateLauncherConfiguration(Process launcher) 106private static Process StartLongRunningProcess() => TestProcesses.StartLongRunning(); 108private static long GetProcessStartTimeUnixMilliseconds(Process process)
Processes\ParentProcessLivenessMonitorTests.cs (6)
20using var parent = StartLongRunningProcess(); 46using var parent = StartLongRunningProcess(); 92using var parent = StartLongRunningProcess(); 118using var parent = StartLongRunningProcess(); 154private static Process StartLongRunningProcess() => TestProcesses.StartLongRunning(); 156private static long GetProcessStartTimeUnixMilliseconds(Process process)
Processes\ProcessTreeGracefulShutdownServiceTests.cs (15)
29using var cliProcess = StartTerminatingShellProcess(); 67using var appHostProcess = StartTerminatingShellProcess(); 68using var cliProcess = StartTerminatingShellProcess(); 227using var appHostProcess = StartTerminatingShellProcess(); 283using var cliProcess = StartSignalIgnoringShellProcess(); 322using var cliProcess = StartSignalIgnoringShellProcess(); 361using var appHostProcess = StartTerminatingShellProcess(); 417private static Process StartSignalIgnoringShellProcess() 428var process = Process.Start(startInfo); 433private static Process StartTerminatingShellProcess() 444var process = Process.Start(startInfo); 449private static DateTimeOffset GetRuntimeProcessStartTime(Process process) 456private static async Task StopProcessAsync(Process process)
Projects\AppHostServerProjectTests.cs (2)
136using var process = Process.Start(startInfo);
Projects\AppHostServerSessionTests.cs (4)
299using var proc = Process.GetProcessById(pid); 576using var probe = Process.GetProcessById(pid);
Projects\JavaAppHostToolchainResolverTests.cs (2)
651using var process = Process.Start(startInfo) ?? throw new InvalidOperationException($"Failed to start '{command.Command}'.");
Projects\PrebuiltAppHostServerTests.cs (6)
182using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start dotnet restore."); 499using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start dotnet build."); 720using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start dotnet build.");
Projects\ProcessGuestLauncherTests.cs (4)
107using var proc = Process.GetProcessById(pid); 161using var proc = Process.GetProcessById(pid);
Telemetry\InternalMicrosoftDetectorTests.cs (1)
1032using var process = new Process { StartInfo = startInfo };
tests\Shared\Processes\ChildProcessTests.cs (6)
139using var observedProcess = Process.GetProcessById(identity.ProcessId); 196using var root = Process.GetProcessById(identities[0].ProcessId); 379using var worker = Process.GetProcessById(identities[1].ProcessId);
tests\Shared\Processes\ProcessSupervisorTests.cs (6)
124using var observedGuardian = Process.GetProcessById(scope.ProcessId); 150using var observedGuardian = Process.GetProcessById(guardian.ProcessId); 171using var observedOwner = Process.GetProcessById(owner.ProcessId);
tests\Shared\Processes\ProcessTestFixture.cs (5)
141using var process = Process.GetProcessById(identity.ProcessId); 170using var process = Process.GetProcessById(identity.ProcessId); 189using var process = new Process
tests\Shared\TemporaryWorkspaceGitExtensions.cs (1)
33using var process = new Process
tests\Shared\TestProcesses.cs (5)
23private static readonly ConcurrentDictionary<int, Process> s_tracked = new(); 32public static Process StartLongRunning() 45var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start long-running test process."); 61foreach (var process in s_tracked.Values)
TestServices\ProcessTestHelpers.cs (4)
72using var probe = Process.GetProcessById(pid); 94using var process = Process.GetProcessById(pid);
Utils\TemporaryWorkspaceTests.cs (2)
129Process? process = null; 137process = Process.GetProcessById(int.Parse(match.Groups[1].Value, System.Globalization.CultureInfo.InvariantCulture));
Aspire.Dashboard (48)
Model\VolumePathLauncher.cs (2)
44using var process = Process.Start(startInfo);
src\Shared\BundleVersionLease.cs (2)
213using var process = Process.GetCurrentProcess();
src\Shared\ChildProcess.cs (18)
35private Process? _process; 103protected Process Process => 112Process process; 156process = Process.Start(startInfo) 178private static DateTimeOffset? GetStartTime(Process process) 195/// Reading the pipes directly, unlike <see cref="Process.BeginOutputReadLine"/>, means 196/// <see cref="Process.WaitForExitAsync"/> does not 200private async Task ReadOutputAsync(Process process) 247var process = Process; 256var process = Process; 307private int GetExitCode(Process process) 326private async Task ShutdownOnCancelAsync(Process process) 346private async Task ShutdownLadderAsync(Process process, Func<int, CancellationToken, Task> requestShutdown, CancellationToken gracefulToken) 404private static void KillOwnedProcess(Process process, bool entireProcessTree) 418private async Task VerifyContainedTerminationAsync(Process process) 465private void RequestGroupTermination(Process process) 496private void ForceKillChild(Process process) 554Process? process;
src\Shared\ProcessSignaler.cs (9)
16using var process = TryGetRunningProcess(pid, expectedStartTime, logger); 27using var process = TryGetRunningProcessWithRuntimeStartTime(pid, expectedStartTime, tolerance, logger); 52using var process = TryGetRunningProcess(pid, expectedStartTime, logger); 67public static Process? TryGetRunningProcess(int pid, DateTimeOffset? expectedStartTime, ILogger logger) 69Process? process = null; 72process = Process.GetProcessById(pid); 130public static Process? TryGetRunningProcessWithRuntimeStartTime(int pid, DateTimeOffset expectedStartTime, TimeSpan tolerance, ILogger logger) 132Process? process = null; 135process = Process.GetProcessById(pid);
src\Shared\ProcessStartTimeHelper.cs (17)
21/// The tolerance legacy callers apply when comparing a <see cref="Process.StartTime"/>-derived 48/// Gets the current process's start time as reported by <see cref="Process.StartTime"/>. 52using var process = Process.GetCurrentProcess(); 67using var process = Process.GetCurrentProcess(); 81/// using <see cref="Process.StartTime"/>. 88using var process = Process.GetProcessById(pid); 110using var process = Process.GetProcessById(pid); 168using var process = Process.GetProcessById(pid); 220/// <see cref="Process.StartTime"/>. Cross-process callers should pass a one-second 221/// <paramref name="tolerance"/> because on Linux <see cref="Process.StartTime"/> is reconstructed from 237using var process = Process.GetProcessById(pid);
Aspire.Dashboard.Playwright.Tests (3)
Integration\Playwright\NativeAotDashboardTests.cs (3)
54using var dashboardProcess = Process.Start(startInfo) 168private static async Task<string> WaitForDashboardAsync(Task<string> dashboardUrlTask, Process dashboardProcess)
Aspire.Deployment.EndToEnd.Tests (56)
AcaCompactNamingDeploymentTests.cs (1)
344var process = new System.Diagnostics.Process
AcaCompactNamingUpgradeDeploymentTests.cs (1)
400var process = new System.Diagnostics.Process
AcaCustomRegistryDeploymentTests.cs (1)
230var process = new System.Diagnostics.Process
AcaDeploymentErrorOutputTests.cs (1)
182var process = new System.Diagnostics.Process
AcaExistingRegistryDeploymentTests.cs (1)
266var process = new System.Diagnostics.Process
AcaExpressDeploymentTests.cs (1)
408using var process = new Process
AcaManagedRedisDeploymentTests.cs (1)
267var process = new System.Diagnostics.Process
AcrPurgeTaskDeploymentTests.cs (1)
263var process = new System.Diagnostics.Process
AksAzureKubernetesEnvironmentCertManagerDeploymentTests.cs (1)
419using var process = new System.Diagnostics.Process
AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.cs (1)
408using var process = new System.Diagnostics.Process
AksAzureKubernetesEnvironmentGatewayDeploymentTests.cs (1)
321using var process = new System.Diagnostics.Process
AksBlazorRedisDeploymentTests.cs (1)
252using var process = new System.Diagnostics.Process
AksCrossResourceGroupRegistryDeploymentTests.cs (1)
402using var process = new Process
AksMultipleNodePoolsDeploymentTests.cs (1)
276using var process = new System.Diagnostics.Process
AksPersistentVolumeDeploymentTests.cs (1)
535using var process = new System.Diagnostics.Process
AksStarterDeploymentTests.cs (1)
419var process = new System.Diagnostics.Process
AksStarterWithRedisHelmDeploymentTests.cs (1)
395var process = new System.Diagnostics.Process
AksVnetInfraDeploymentTests.cs (1)
206using var process = new System.Diagnostics.Process
AksVnetWithAzureResourcesDeploymentTests.cs (1)
356using var process = new System.Diagnostics.Process
AksWithAzureResourcesDeploymentTests.cs (1)
337using var process = new System.Diagnostics.Process
AksWithHelmChartDeploymentTests.cs (1)
273using var process = new System.Diagnostics.Process
AppServicePythonDeploymentTests.cs (1)
215var process = new System.Diagnostics.Process
AppServiceReactDeploymentTests.cs (1)
487using var process = new System.Diagnostics.Process
AppServiceStoragePrivateEndpointDeploymentTests.cs (1)
388using var process = new System.Diagnostics.Process
AzureAppConfigDeploymentTests.cs (1)
182var process = new System.Diagnostics.Process
AzureConnectorNamespaceDeploymentTests.cs (1)
285using var process = new System.Diagnostics.Process
AzureContainerRegistryDeploymentTests.cs (1)
165var process = new System.Diagnostics.Process
AzureEventHubsDeploymentTests.cs (1)
182var process = new System.Diagnostics.Process
AzureKeyVaultDeploymentTests.cs (1)
182var process = new System.Diagnostics.Process
AzureLogAnalyticsDeploymentTests.cs (1)
165var process = new System.Diagnostics.Process
AzureResourceScopeDeploymentTests.cs (1)
233var process = new System.Diagnostics.Process
AzureRoleAssignmentRunModeTests.cs (1)
244using var process = new System.Diagnostics.Process
AzureSandboxesDeploymentTests.cs (2)
742using var process = Process.Start(startInfo);
AzureServiceBusDeploymentTests.cs (1)
184var process = new System.Diagnostics.Process
AzureStorageDeploymentTests.cs (1)
390var process = new System.Diagnostics.Process
AzureStorageRunModeTests.cs (1)
227using var process = new System.Diagnostics.Process
FoundryHostedAgentDeploymentTests.cs (1)
701var process = new System.Diagnostics.Process
FrontDoorDeploymentTests.cs (1)
234var process = new System.Diagnostics.Process
Helpers\DeploymentE2ETestHelpers.cs (1)
147using var process = new Process
Helpers\DotnetProjectDeploymentHelpers.cs (1)
105using var process = new Process
KubernetesGatewayTlsDeploymentTests.cs (1)
467var process = new System.Diagnostics.Process
KubernetesHelmChartDeploymentTests.cs (1)
317using var process = new System.Diagnostics.Process
NspStorageKeyVaultDeploymentTests.cs (1)
346var process = new System.Diagnostics.Process
PythonFastApiDeploymentTests.cs (1)
217var process = new System.Diagnostics.Process
RadiusStarterDeploymentTests.cs (1)
670using var process = new System.Diagnostics.Process
TypeScriptAzureContainerAppJobDeploymentTests.cs (1)
174using var process = new System.Diagnostics.Process
TypeScriptExpressDeploymentTests.cs (1)
204var process = new System.Diagnostics.Process
TypeScriptJavaScriptHostingDeploymentTests.cs (1)
207using var process = new System.Diagnostics.Process
TypeScriptVnetSqlServerInfraDeploymentTests.cs (1)
272var process = new System.Diagnostics.Process
VnetKeyVaultConnectivityDeploymentTests.cs (1)
258var process = new System.Diagnostics.Process
VnetKeyVaultInfraDeploymentTests.cs (1)
193var process = new System.Diagnostics.Process
VnetSqlServerConnectivityDeploymentTests.cs (1)
325var process = new System.Diagnostics.Process
VnetSqlServerInfraDeploymentTests.cs (1)
194var process = new System.Diagnostics.Process
VnetStorageBlobConnectivityDeploymentTests.cs (1)
265var process = new System.Diagnostics.Process
VnetStorageBlobInfraDeploymentTests.cs (1)
195var process = new System.Diagnostics.Process
Aspire.EndToEnd.Tests (5)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
26public Process? AppHostProcess { get; private set; }
tests\Shared\TemplatesTesting\TestExtensions.cs (2)
20public static bool TryGetHasExited(this Process process) 32public static void CloseAndKillProcessIfRunning(this Process process)
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
19public Process? CurrentProcess { get; private set; } 208private Process CreateProcess(string executable, string args)
Aspire.Hosting (51)
ApplicationModel\ProjectRebuilderResource.cs (1)
10/// This uses a DCP executable resource rather than <see cref="System.Diagnostics.Process"/> directly
Backchannel\AuxiliaryBackchannelRpcTarget.cs (2)
920using var currentProcess = Process.GetCurrentProcess();
Backchannel\BackchannelDataTypes.cs (2)
1503/// Gets or sets when the AppHost process started using the legacy <see cref="Process.StartTime"/> clock domain. 1528/// <see cref="Process.StartTime"/> for released-AppHost compatibility. On Linux it drifts across
Cli\CliOrphanDetector.cs (1)
14using var process = ProcessSignaler.TryGetRunningProcess(pid, null, logger);
Dcp\DcpProcessMonitor.cs (3)
4using SystemProcess = System.Diagnostics.Process; 12internal static DcpProcessIdentity GetMonitorProcessIdentity(SystemProcess parentProcess) 27private static DateTime? GetProcessIdentityTimestamp(SystemProcess parentProcess)
Dcp\Process\ProcessUtil.cs (4)
40var process = new System.Diagnostics.Process() 244private readonly System.Diagnostics.Process _process; 248public ProcessDisposable(System.Diagnostics.Process process, Task processLifetimeTask, bool entireProcessTree) 303private static void Kill(System.Diagnostics.Process process, bool entireProcessTree)
Diagnostics\ProfilingTelemetry.cs (1)
749return new DateTimeOffset(Process.GetCurrentProcess().StartTime.ToUniversalTime(), TimeSpan.Zero);
ResourceBuilderExtensions.cs (3)
29using SystemProcess = System.Diagnostics.Process; 192using var parentProcess = SystemProcess.GetProcessById(parentProcessId);
src\Shared\BackchannelConstants.cs (2)
417using var process = Process.GetProcessById(pid);
src\Shared\ContainerRuntimeProbe.cs (6)
141using var process = Process.Start(startInfo); 275using var process = Process.Start(startInfo); 371using var process = Process.Start(startInfo);
src\Shared\ProcessSignaler.cs (9)
16using var process = TryGetRunningProcess(pid, expectedStartTime, logger); 27using var process = TryGetRunningProcessWithRuntimeStartTime(pid, expectedStartTime, tolerance, logger); 52using var process = TryGetRunningProcess(pid, expectedStartTime, logger); 67public static Process? TryGetRunningProcess(int pid, DateTimeOffset? expectedStartTime, ILogger logger) 69Process? process = null; 72process = Process.GetProcessById(pid); 130public static Process? TryGetRunningProcessWithRuntimeStartTime(int pid, DateTimeOffset expectedStartTime, TimeSpan tolerance, ILogger logger) 132Process? process = null; 135process = Process.GetProcessById(pid);
src\Shared\ProcessStartTimeHelper.cs (17)
21/// The tolerance legacy callers apply when comparing a <see cref="Process.StartTime"/>-derived 48/// Gets the current process's start time as reported by <see cref="Process.StartTime"/>. 52using var process = Process.GetCurrentProcess(); 67using var process = Process.GetCurrentProcess(); 81/// using <see cref="Process.StartTime"/>. 88using var process = Process.GetProcessById(pid); 110using var process = Process.GetProcessById(pid); 168using var process = Process.GetProcessById(pid); 220/// <see cref="Process.StartTime"/>. Cross-process callers should pass a one-second 221/// <paramref name="tolerance"/> because on Linux <see cref="Process.StartTime"/> is reconstructed from 237using var process = Process.GetProcessById(pid);
Aspire.Hosting.Azure (4)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (4)
40var process = new System.Diagnostics.Process() 244private readonly System.Diagnostics.Process _process; 248public ProcessDisposable(System.Diagnostics.Process process, Task processLifetimeTask, bool entireProcessTree) 303private static void Kill(System.Diagnostics.Process process, bool entireProcessTree)
Aspire.Hosting.Azure.Tests (5)
FoundryExtensionsTests.cs (5)
206using var daemon = Process.GetProcessById(daemonPid); 226using var daemon = Process.Start(daemonStartInfo) ?? 236using var process = new Process
Aspire.Hosting.Browsers (4)
BrowserEndpointDiscovery.cs (2)
234using var process = Process.GetProcessById(processId);
BrowserLogsPipeBrowserProcessLauncher.Windows.cs (2)
247using var process = Process.GetProcessById(processId);
Aspire.Hosting.Browsers.Tests (4)
src\Aspire.Hosting.Browsers\BrowserEndpointDiscovery.cs (2)
234using var process = Process.GetProcessById(processId);
src\Aspire.Hosting.Browsers\BrowserLogsPipeBrowserProcessLauncher.Windows.cs (2)
247using var process = Process.GetProcessById(processId);
Aspire.Hosting.CodeGeneration.Go.Tests (11)
AtsGoCodeGeneratorTests.cs (8)
103using var process = new Process 143using var process = new Process(); 1015using var process = Process.Start(new ProcessStartInfo("go") 1178using var process = Process.Start(new ProcessStartInfo("go") 1557using var process = new Process(); 1729using var process = new Process();
AtsGoDerivedBuilderTests.cs (1)
416using var process = new Process();
GoDocCommentTests.cs (1)
292using var process = new Process();
GoScaffoldTests.cs (1)
243using var process = new Process();
Aspire.Hosting.CodeGeneration.Java.Tests (1)
AtsJavaCodeGeneratorTests.cs (1)
3875using var process = new Process { StartInfo = startInfo };
Aspire.Hosting.CodeGeneration.Python (2)
PythonLanguageSupport.cs (2)
280using var process = Process.Start(startInfo);
Aspire.Hosting.CodeGeneration.Python.Tests (1)
AtsPythonCodeGeneratorTests.cs (1)
771using var process = new Process();
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
AtsRustCodeGeneratorTests.cs (1)
111using var process = new Process
Aspire.Hosting.DevTunnels (1)
DevTunnelCli.cs (1)
250using var process = new Process
Aspire.Hosting.Docker (4)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (4)
40var process = new System.Diagnostics.Process() 244private readonly System.Diagnostics.Process _process; 248public ProcessDisposable(System.Diagnostics.Process process, Task processLifetimeTask, bool entireProcessTree) 303private static void Kill(System.Diagnostics.Process process, bool entireProcessTree)
Aspire.Hosting.Dotnet (1)
DotnetProjectRunPropertiesResolver.cs (1)
74using var process = new Process { StartInfo = startInfo };
Aspire.Hosting.EntityFrameworkCore (2)
EFResourceBuilderExtensions.cs (2)
493Process? process = null; 561process = Process.Start(startInfo);
Aspire.Hosting.Foundry (9)
FoundryLocalService.cs (9)
24private static Process? s_serviceProcess; 166var process = s_serviceProcess; 271var process = new Process 319var (source, foundryProcess, timeoutToken) = ((TaskCompletionSource<Uri>, Process, CancellationToken))state!; 377using var process = new Process 392Process process, 404using var cancellationRegistration = cancellationToken.Register(static state => KillProcess((Process)state!), process); 425using var startCancellationRegistration = startCancellation.Token.Register(static state => KillProcess((Process)state!), process); 696private static void KillProcess(Process process)
Aspire.Hosting.Java.Tests (8)
AddJavaAppPublishTests.cs (6)
55using var process = Process.Start(new ProcessStartInfo("sh") 1716using var process = Process.Start(new ProcessStartInfo 1880using var process = Process.Start(new ProcessStartInfo("/bin/sh")
AddJavaAppTests.cs (2)
826using var process = Process.Start(new ProcessStartInfo(app.Resource.Command)
Aspire.Hosting.JavaScript.Tests (8)
AddDenoAppTests.cs (2)
2716using var process = Process.Start(processStartInfo);
AddJavaScriptAppTests.cs (6)
594using var process = Process.Start(processStartInfo); 605using var cleanupProcess = Process.Start(new ProcessStartInfo 701using var process = Process.Start(processStartInfo);
Aspire.Hosting.Kubernetes (4)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (4)
40var process = new System.Diagnostics.Process() 244private readonly System.Diagnostics.Process _process; 248public ProcessDisposable(System.Diagnostics.Process process, Task processLifetimeTask, bool entireProcessTree) 303private static void Kill(System.Diagnostics.Process process, bool entireProcessTree)
Aspire.Hosting.Maui (4)
Lifecycle\MauiBuildQueueEventSubscriber.cs (2)
219using var process = new Process { StartInfo = psi }; 284private static void TryKillProcess(Process process, ILogger logger)
Utilities\ProjectFileReader.cs (2)
70using var process = Process.Start(startInfo);
Aspire.Hosting.Native.Client (4)
NativeProviderHost.cs (4)
64private readonly Process _process; 71internal NativeProviderActivation(Process process, NativeProviderActivationOptions options, TimeProvider clock) 121activation = new NativeProviderActivation(Process.Start(start) ?? throw new InvalidOperationException("The provider process did not start."), options, clock); 167using var processLifetime = _process;
Aspire.Hosting.Native.Core.Tests (26)
NativeComposeCSharpDockerTests.cs (2)
97using var process = Process.Start(start)!;
NativeComposeCSharpTests.cs (2)
145using var process = Process.Start(start)!;
NativeIpcSecurityTests.cs (2)
83using var process = Process.Start(start) ?? throw new InvalidOperationException("The cross-user probe did not start.");
NativeProductCliTests.cs (2)
24Process? process = null; 58process = Process.Start(start) ?? throw new InvalidOperationException("The CLI did not start.");
NativeRedisAppHostTests.cs (4)
59using var snapshot = Process.Start(verify)!; 74using var cleanup = Process.Start(start)!;
src\Aspire.Hosting\Backchannel\BackchannelDataTypes.cs (2)
1503/// Gets or sets when the AppHost process started using the legacy <see cref="Process.StartTime"/> clock domain. 1528/// <see cref="Process.StartTime"/> for released-AppHost compatibility. On Linux it drifts across
TestServices\NativeClientTestHost.cs (2)
19private Process? _process; 79host._process = Process.Start(start) ?? throw new InvalidOperationException("The native test server did not start.");
TestServices\NativeIntegrationAppHostRunner.cs (2)
24using var process = Process.Start(start) ?? throw new InvalidOperationException("The AppHost did not start.");
TestServices\NativeProviderProcessTestHost.cs (8)
9internal sealed class NativeProviderProcessTestHost(Process process, Process? descendant) : IAsyncDisposable 11public Process Process { get; } = process; 12public Process? Descendant { get; } = descendant; 26var process = System.Diagnostics.Process.Start(start) ?? throw new InvalidOperationException("The provider fixture did not start."); 27Process? descendant = null; 34descendant = System.Diagnostics.Process.GetProcessById(int.Parse(line, CultureInfo.InvariantCulture));
Aspire.Hosting.Native.Server (26)
Auxiliary\NativeAuxiliaryBackchannel.cs (2)
184using var process = Process.GetCurrentProcess();
Dcp\DcpApiClient.cs (3)
25private Process? _process; 85_process = Process.Start(start) ?? throw new InvalidOperationException("DCP did not start."); 106private async Task DrainOutputAsync(Process process)
src\Shared\BackchannelConstants.cs (2)
417using var process = Process.GetProcessById(pid);
src\Shared\BundleVersionLease.cs (2)
213using var process = Process.GetCurrentProcess();
src\Shared\ProcessStartTimeHelper.cs (17)
21/// The tolerance legacy callers apply when comparing a <see cref="Process.StartTime"/>-derived 48/// Gets the current process's start time as reported by <see cref="Process.StartTime"/>. 52using var process = Process.GetCurrentProcess(); 67using var process = Process.GetCurrentProcess(); 81/// using <see cref="Process.StartTime"/>. 88using var process = Process.GetProcessById(pid); 110using var process = Process.GetProcessById(pid); 168using var process = Process.GetProcessById(pid); 220/// <see cref="Process.StartTime"/>. Cross-process callers should pass a one-second 221/// <paramref name="tolerance"/> because on Linux <see cref="Process.StartTime"/> is reconstructed from 237using var process = Process.GetProcessById(pid);
Aspire.Hosting.Python (2)
PythonVersionDetector.cs (2)
78using var process = Process.Start(startInfo);
Aspire.Hosting.Python.Tests (4)
AddPythonAppTests.cs (4)
317var createVirtualEnvironmentProcess = Process.Start(prepareVirtualEnvironmentStartInfo); 347var installRequirementsProcess = Process.Start(installRequirementsStartInfo);
Aspire.Hosting.Radius (7)
Publishing\RadCredentialRegisterStep.cs (1)
257using var process = new Process();
Publishing\RadiusDeploymentPipelineStep.cs (4)
328using var process = new Process(); 412private static async Task ObserveCleanupAsync(Process process, Task<string> stdoutTask, Task<string> stderrTask) 457using var process = new Process(); 551using var process = new Process();
Publishing\SealedSecretApplyStep.cs (2)
698using var process = new Process 754using var process = new Process
Aspire.Hosting.RemoteHost (45)
src\Shared\ChildProcess.cs (19)
35private Process? _process; 103protected Process Process => 112Process process; 156process = Process.Start(startInfo) 178private static DateTimeOffset? GetStartTime(Process process) 195/// Reading the pipes directly, unlike <see cref="Process.BeginOutputReadLine"/>, means 196/// <see cref="Process.WaitForExitAsync"/> does not 200private async Task ReadOutputAsync(Process process) 247var process = Process; 256var process = Process; 307private int GetExitCode(Process process) 326private async Task ShutdownOnCancelAsync(Process process) 346private async Task ShutdownLadderAsync(Process process, Func<int, CancellationToken, Task> requestShutdown, CancellationToken gracefulToken) 404private static void KillOwnedProcess(Process process, bool entireProcessTree) 418private async Task VerifyContainedTerminationAsync(Process process) 465private void RequestGroupTermination(Process process) 496private void ForceKillChild(Process process) 554Process? process; 690private static async IAsyncEnumerable<OutputLine> ReadAllLinesAsync(Process process, [EnumeratorCancellation] CancellationToken cancellationToken = default)
src\Shared\ProcessSignaler.cs (9)
16using var process = TryGetRunningProcess(pid, expectedStartTime, logger); 27using var process = TryGetRunningProcessWithRuntimeStartTime(pid, expectedStartTime, tolerance, logger); 52using var process = TryGetRunningProcess(pid, expectedStartTime, logger); 67public static Process? TryGetRunningProcess(int pid, DateTimeOffset? expectedStartTime, ILogger logger) 69Process? process = null; 72process = Process.GetProcessById(pid); 130public static Process? TryGetRunningProcessWithRuntimeStartTime(int pid, DateTimeOffset expectedStartTime, TimeSpan tolerance, ILogger logger) 132Process? process = null; 135process = Process.GetProcessById(pid);
src\Shared\ProcessStartTimeHelper.cs (17)
21/// The tolerance legacy callers apply when comparing a <see cref="Process.StartTime"/>-derived 48/// Gets the current process's start time as reported by <see cref="Process.StartTime"/>. 52using var process = Process.GetCurrentProcess(); 67using var process = Process.GetCurrentProcess(); 81/// using <see cref="Process.StartTime"/>. 88using var process = Process.GetProcessById(pid); 110using var process = Process.GetProcessById(pid); 168using var process = Process.GetProcessById(pid); 220/// <see cref="Process.StartTime"/>. Cross-process callers should pass a one-second 221/// <paramref name="tolerance"/> because on Linux <see cref="Process.StartTime"/> is reconstructed from 237using var process = Process.GetProcessById(pid);
Aspire.Hosting.RemoteHost.Tests (25)
CapabilityDispatcherTests.cs (1)
36using var process = new Process
IntegrationHostProcessTests.cs (2)
158using (var process = Process.GetProcessById(supervisor))
tests\Shared\Processes\ChildProcessTests.cs (6)
139using var observedProcess = Process.GetProcessById(identity.ProcessId); 196using var root = Process.GetProcessById(identities[0].ProcessId); 379using var worker = Process.GetProcessById(identities[1].ProcessId);
tests\Shared\Processes\ProcessSupervisorTests.cs (6)
124using var observedGuardian = Process.GetProcessById(scope.ProcessId); 150using var observedGuardian = Process.GetProcessById(guardian.ProcessId); 171using var observedOwner = Process.GetProcessById(owner.ProcessId);
tests\Shared\Processes\ProcessTestFixture.cs (5)
141using var process = Process.GetProcessById(identity.ProcessId); 170using var process = Process.GetProcessById(identity.ProcessId); 189using var process = new Process
TestServices\IntegrationHostProcessFixture.cs (5)
102using var process = new Process 301private readonly Process _server; 325_server = Process.Start(startInfo) ?? throw new InvalidOperationException("Could not start test server."); 422using var process = Process.GetProcessById(processId);
Aspire.Hosting.Rust (2)
CargoMetadataReader.cs (2)
84using var process = new Process { StartInfo = startInfo }; 217private static void TryKillProcess(Process process)
Aspire.Hosting.Rust.Tests (2)
RustDockerfileShellTests.cs (2)
219using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start /bin/sh.");
Aspire.Hosting.Sdk.Tests (10)
AppHostSdkTargetsTests.cs (10)
1240using var survivingChild = TryGetProcessById(childProcessId.Value); 1248using var childProcess = TryGetProcessById(processId); 1296using var survivingProcess = TryGetProcessById(processId.Value); 1310using var process = TryGetProcessById(startedProcessId); 2243using var process = Process.Start(new ProcessStartInfo("dotnet", arguments) 2309using var process = Process.Start(startInfo); 2331private static Process? TryGetProcessById(int processId) 2335return Process.GetProcessById(processId);
Aspire.Hosting.Tasks (5)
ResolveAspireCliInvocation.cs (2)
160using var process = Process.Start(startInfo);
RunAspireCliCommand.cs (3)
68internal Func<Process, bool>? TestTerminateProcess { get; set; } 85using var process = new Process 159private bool TerminateProcess(Process process)
Aspire.Hosting.Tests (30)
Cli\CliOrphanDetectorTests.cs (1)
262using var fakeCliProcess = TestProcesses.StartLongRunning();
Cli\ProcessSignalerTests.cs (6)
17var currentProcess = Process.GetCurrentProcess(); 24using var result = ProcessSignaler.TryGetRunningProcess( 36var currentProcess = Process.GetCurrentProcess(); 44using var result = ProcessSignaler.TryGetRunningProcess(
Cli\ProcessStartTimeHelperTests.cs (1)
35using var process = TestProcesses.StartLongRunning();
Dcp\DcpExecutorTests.cs (2)
5965using var parentProcess = Process.GetCurrentProcess();
Dcp\ProcessUtilTests.cs (3)
20var processStarted = new TaskCompletionSource<System.Diagnostics.Process>(TaskCreationOptions.RunContinuationsAsynchronously); 27}, pid => processStarted.TrySetResult(System.Diagnostics.Process.GetProcessById(pid))); 33using var process = await processStarted.Task.DefaultTimeout(TestConstants.LongTimeoutDuration);
DistributedApplicationTests.cs (5)
2045using var parentProcess = Process.GetCurrentProcess(); 2109using var parentProcess = StartLongRunningProcess(); 2399private static Process StartLongRunningProcess() => TestProcesses.StartLongRunning(); 2401private static async Task KillProcessAsync(Process process, CancellationToken cancellationToken)
MSBuildTests.cs (2)
405using var process = new Process(); 1743using var process = new Process();
ResourceBuilderLifetimeTests.cs (2)
96using var parentProcess = Process.GetCurrentProcess();
Terminals\Hex1bAspireTerminalTests.cs (2)
310using var process = Process.GetProcessById(pid);
tests\Shared\TestProcesses.cs (5)
23private static readonly ConcurrentDictionary<int, Process> s_tracked = new(); 32public static Process StartLongRunning() 45var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start long-running test process."); 61foreach (var process in s_tracked.Values)
WithTerminalTests.cs (1)
645using var liveProcess = TestProcesses.StartLongRunning();
Aspire.Hosting.TestUtilities (2)
Utils\DockerUtils.cs (2)
122if (Process.Start(runtime, $"volume rm {volumeName}") is { } process) 138if (Process.Start(runtime, $"volume inspect {volumeName}") is { } process)
Aspire.Managed.Tests (10)
TerminalHostSignalTests.cs (10)
41using var process = Process.Start(startInfo) 110using var process = Process.Start(startInfo)!; 153using var process = Process.Start(startInfo)!; 186using var parentProcess = Process.Start( 217using var process = Process.Start(startInfo)
Aspire.Playground.Tests (2)
tests\Aspire.TestUtilities\TestcontainersPodmanConfiguration.cs (2)
250using var process = Process.Start(startInfo);
Aspire.Templates.Tests (5)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
26public Process? AppHostProcess { get; private set; }
tests\Shared\TemplatesTesting\TestExtensions.cs (2)
20public static bool TryGetHasExited(this Process process) 32public static void CloseAndKillProcessIfRunning(this Process process)
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
19public Process? CurrentProcess { get; private set; } 208private Process CreateProcess(string executable, string args)
Aspire.TerminalHost (19)
src\Shared\BundleVersionLease.cs (2)
213using var process = Process.GetCurrentProcess();
src\Shared\ProcessStartTimeHelper.cs (17)
21/// The tolerance legacy callers apply when comparing a <see cref="Process.StartTime"/>-derived 48/// Gets the current process's start time as reported by <see cref="Process.StartTime"/>. 52using var process = Process.GetCurrentProcess(); 67using var process = Process.GetCurrentProcess(); 81/// using <see cref="Process.StartTime"/>. 88using var process = Process.GetProcessById(pid); 110using var process = Process.GetProcessById(pid); 168using var process = Process.GetProcessById(pid); 220/// <see cref="Process.StartTime"/>. Cross-process callers should pass a one-second 221/// <paramref name="tolerance"/> because on Linux <see cref="Process.StartTime"/> is reconstructed from 237using var process = Process.GetProcessById(pid);
Aspire.TestTools (2)
GitHubCli.cs (2)
261using var process = new Process 311using var process = new Process
Aspire.TestUtilities (4)
ProcessExtensions.cs (2)
14public static bool TryGetHasExited(this Process process) 26public static void CloseAndKillProcessIfRunning(this Process? process)
TestcontainersPodmanConfiguration.cs (2)
250using var process = Process.Start(startInfo);
Aspire.Tray.Tests (59)
CliAppHostClientTests.cs (6)
55using var process = Process.GetProcessById(await cli.WaitForPidAsync(TestContext.Current.CancellationToken)); 184using var process = Process.GetProcessById(await cli.WaitForPidAsync(TestContext.Current.CancellationToken)); 199using var process = Process.GetProcessById(await cli.WaitForPidAsync(TestContext.Current.CancellationToken));
CliAppHostCommandsTests.cs (14)
98using var otherProcess = Process.Start(CliProcess.CreateStartInfo(otherCli.Path)) 106using var process = Process.GetProcessById(pid); 140using var process = Process.GetProcessById(pid); 170using var process = Process.GetProcessById(await cli.WaitForPidAsync(TestContext.Current.CancellationToken)); 281Process? detached = null; 284detached = Process.GetProcessById(await cli.WaitForDetachedPidAsync(TestContext.Current.CancellationToken)); 285using var process = Process.GetProcessById(await cli.WaitForPidAsync(TestContext.Current.CancellationToken)); 326using var process = Process.GetProcessById(await cli.WaitForPidAsync(TestContext.Current.CancellationToken));
Helpers\TestNativeCommand.cs (2)
23using var process = Process.Start(startInfo) ?? throw new InvalidOperationException($"Could not start {command}.");
MacTrayLauncherTests.cs (2)
179using var unrelated = Process.Start("/bin/sleep", "60")!;
src\Aspire.Tray\Common\CliAppHostClient.cs (2)
106using var process = Process.Start(CreateWatchStartInfo(_cliPath))
src\Aspire.Tray\Common\CliAppHostCommands.cs (4)
60Process process; 63process = Process.Start(startInfo) ?? throw new InvalidOperationException("Could not start the Aspire CLI."); 110using var process = Process.Start(CreateStopStartInfo(cliPath, target))
src\Aspire.Tray\Common\CliProcess.cs (1)
42public static async Task TerminateOwnedChildAsync(Process process)
src\Aspire.Tray\Common\TrayActivation.cs (2)
42using var process = Process.GetCurrentProcess();
src\Aspire.Tray\Common\TrayProcessIdentity.cs (2)
12Process process; 15process = Process.GetProcessById(ProcessId);
src\Aspire.Tray\Common\WindowsLoginBootstrap.cs (2)
29using var process = Process.Start(CreateStartInfo(cliPath))
src\Shared\BundleVersionLease.cs (2)
213using var process = Process.GetCurrentProcess();
TrayActivationTests.cs (8)
67using var process = Process.GetCurrentProcess(); 185using var process = Process.GetCurrentProcess(); 205using var process = Process.GetCurrentProcess(); 280using var process = Process.GetCurrentProcess();
TrayProcessIdentityTests.cs (4)
13using var process = Process.GetCurrentProcess(); 28using var process = Process.GetCurrentProcess();
WindowsTrayLauncherTests.cs (8)
58Process? child = null; 69child = Process.GetProcessById(BinaryPrimitives.ReadInt32LittleEndian(identity)); 119using var unrelated = Process.Start(start)!; 120using var child = Process.Start(start)!; 141using var child = Process.Start(new ProcessStartInfo(Path.Combine(Environment.SystemDirectory, "cmd.exe"))
CreateLayout (2)
Program.cs (2)
442using var process = Process.Start(psi);
csc (5)
src\roslyn\src\Compilers\CSharp\csc\Program.cs (1)
31using var logger = new CompilerServerLogger($"csc {Process.GetCurrentProcess().Id}", StandardBuildEnvironment.Instance);
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
173using var process = Process.GetProcessById(serverProcessId); 673if (Process.Start(startInfo) is { } process)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
181var processId = Process.GetCurrentProcess().Id;
datacollector (7)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (7)
60ConsoleOutput.Instance.WriteLine($"Attaching Visual Studio with PID {vsPid} to the process '{Process.GetCurrentProcess().ProcessName}({processId})'...", OutputLevel.Information); 63AttachVs(Process.GetCurrentProcess(), vsPid); 69private static bool AttachVs(Process process, int? vsPid) 90var attachVsProcess = Process.Start(vsAttachPath, $"{process.Id} {vsPid}"); 132var currentProcess = Process.GetCurrentProcess();
datacollector.arm64 (7)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (7)
60ConsoleOutput.Instance.WriteLine($"Attaching Visual Studio with PID {vsPid} to the process '{Process.GetCurrentProcess().ProcessName}({processId})'...", OutputLevel.Information); 63AttachVs(Process.GetCurrentProcess(), vsPid); 69private static bool AttachVs(Process process, int? vsPid) 90var attachVsProcess = Process.Start(vsAttachPath, $"{process.Id} {vsPid}"); 132var currentProcess = Process.GetCurrentProcess();
dotnet-aot (10)
NativeEntryPoint.cs (2)
146mainActivity.SetStartTime(Process.GetCurrentProcess().StartTime.ToUniversalTime()); 147mainActivity.AddTag("process.pid", Process.GetCurrentProcess().Id);
parent\dotnet\CommandFactory\CommandFactoryUsingResolver.cs (1)
118var _process = new Process
parent\dotnet\Commands\Test\MTP\CtrlCCancellationManager.cs (5)
34private readonly ConcurrentDictionary<Process, byte> _processes = new(); 64public void Register(Process process) 76public void Unregister(Process process) 135foreach (var process in _processes.Keys) 144private static void TryKill(Process process)
parent\dotnet\Commands\Test\MTP\TestApplication.cs (2)
104Process? process = null; 110process = Process.Start(processStartInfo)!;
dotnet-dev-certs (14)
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (7)
106var exitStatus = Process.Run(new ProcessStartInfo(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)); 170var checkTrustProcessOutput = Process.Run(checkTrustProcessStartInfo); 216var processExitStatus = Process.Run(processInfo); 257var processOutput = Process.RunAndCaptureText(processInfo); 284using var findCertificateProcess = Process.Start(new ProcessStartInfo( 354var processOutput = Process.RunAndCaptureText(processInfo);
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (6)
696return Process.Run(startInfo).ExitCode == 0; 718return Process.Run(startInfo).ExitCode == 0; 746return Process.Run(startInfo).ExitCode == 0; 769if (Process.Run(startInfo).ExitCode == 0) 939var processOutput = Process.RunAndCaptureText(processInfo); 981var processOutput = Process.RunAndCaptureText(processInfo);
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-format (8)
Utilities\ProcessRunner.cs (8)
11public Process Process { get; } 16public ProcessResult(Process process, int exitCode, ReadOnlyCollection<string> outputLines, ReadOnlyCollection<string> errorLines) 27public Process Process { get; } 33public ProcessInfo(Process process, ProcessStartInfo startInfo, Task<ProcessResult> result) 47Process.Start(file); 59Action<Process>? onProcessStartHandler = null, 70Action<Process>? onProcessStartHandler = null, 77var process = new Process();
dotnet-getdocument (3)
Exe.cs (2)
39using var process = Process.Start(startInfo);
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-openapi (3)
Commands\BaseCommand.cs (2)
230using var process = Process.Start(startInfo);
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-sql-cache (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
dotnet-suggest (1)
SuggestionStore.cs (1)
38using (var process = new Process
dotnet-svcutil-lib (6)
Shared\Utilities\DebugUtils.cs (2)
42var process = Process.GetCurrentProcess();
Shared\Utilities\ProcessRunner.cs (2)
68using (var proc = new Process()) 150var exitCode = Path.GetFileName(processName) == Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName) ? proc.ExitCode : -1;
Shared\Utilities\SafeLogger.cs (2)
25return $"[{Process.GetCurrentProcess().Id}.{startTime.Millisecond}] {message}"; 31return $"[{Process.GetCurrentProcess().Id}.{startTime.Millisecond}] Time elapsed: {DateTime.Now - startTime}";
dotnet-user-jwts (3)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (2)
84using var process = new Process() 168using var process = new Process()
dotnet-user-secrets (3)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (2)
84using var process = new Process() 168using var process = new Process()
GenerateTemplateManifest (2)
Program.cs (2)
185using (var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start dotnet restore"))
GetDocument.Insider (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Infrastructure.Common (2)
CertificateManager.cs (2)
310using (var p = Process.Start(psi))
Infrastructure.Tests (34)
CreateFailingTestIssue\CreateFailingTestIssueFixture.cs (1)
42using var process = new Process { StartInfo = processStartInfo };
CreateFailingTestIssue\CreateFailingTestIssueToolTests.cs (1)
647using var process = new Process { StartInfo = processStartInfo };
DownloadFailingJobLogs\DownloadFailingJobLogsToolTests.cs (1)
103using var process = new Process { StartInfo = processStartInfo };
ExtractTestPartitions\ExtractTestPartitionsFixture.cs (1)
32using var process = new Process { StartInfo = psi };
ExtractTestPartitions\ExtractTestPartitionsTests.cs (1)
314using var process = new Process { StartInfo = psi };
GenerateTestSummary\GenerateTestSummaryFixture.cs (1)
35using var process = new Process { StartInfo = processStartInfo };
GenerateTestSummary\GenerateTestSummaryToolTests.cs (1)
264using var process = new Process { StartInfo = processStartInfo };
Hex1bNativePublishingTests.cs (2)
462using var process = Process.Start(startInfo)!;
Pipelines\NixCliPackageTests.cs (1)
161using var process = new System.Diagnostics.Process();
PowerShellScripts\PowerShellCommand.cs (2)
23public Process? CurrentProcess { get; private set; } 200private Process CreateProcess(string args)
Shared\GitCli.cs (2)
39using var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start git.");
Shared\ProcessRunner.cs (1)
18using var process = new Process();
TestTriggerMap\TestTriggerMapTests.cs (2)
476using var process = System.Diagnostics.Process.Start(startInfo)
tools\GenerateCITimeline\GitHubApi.cs (2)
17using var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start gh process.");
WorkflowScripts\AnalyzeCiFailureWorkflowTests.cs (2)
4706using var process = new Process(); 4862using var process = new Process();
WorkflowScripts\DeploymentTestScriptTests.cs (1)
89using var process = new Process();
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (2)
260using var process = new Process(); 428using var process = new Process();
WorkflowScripts\ExtensionReleaseWorkflowTests.cs (5)
363using var process = Process.Start(startInfo) 401using var process = new Process(); 434using var process = new Process(); 508using var process = new Process();
WorkflowScripts\MtpExitCodeScriptTests.cs (1)
53using var process = new Process();
WorkflowScripts\NodeCommand.cs (2)
28public Process? CurrentProcess { get; private set; } 180private Process CreateProcess(string scriptPath, string[] args)
WorkflowScripts\PrDocsCheckWorkflowTests.cs (2)
40using var process = Process.Start(startInfo)
Microsoft.Agents.AI.ProjectTemplates.Tests (2)
test\ProjectTemplates\Infrastructure\ProcessExtensions.cs (1)
11public static bool TryGetHasExited(this Process process)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
55using var process = new Process
Microsoft.Arcade.Common (1)
Command.cs (1)
18private readonly Process _process;
Microsoft.AspNetCore.Components.Testing (4)
Infrastructure\ParentProcessWatcher.cs (2)
33var parent = Process.GetProcessById(_parentPid);
Infrastructure\ServerInstance.cs (2)
26private Process? _process; 95_process = Process.Start(startInfo)
Microsoft.AspNetCore.Components.WebAssembly.Server (5)
DebugProxyLauncher.cs (4)
77var debugProxyProcess = Process.Start(processStartInfo); 139private static void PassThroughConsoleOutput(Process process) 165private static void CompleteTaskWhenServerIsReady(Process aspNetProcess, bool isFirefox, TaskCompletionSource<string> taskCompletionSource)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
65var mainModuleFullPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
381 using (var launchBrowser = new Process())
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
381 using (var launchBrowser = new Process())
Microsoft.AspNetCore.DeveloperCertificates.XPlat (13)
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (7)
106var exitStatus = Process.Run(new ProcessStartInfo(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)); 170var checkTrustProcessOutput = Process.Run(checkTrustProcessStartInfo); 216var processExitStatus = Process.Run(processInfo); 257var processOutput = Process.RunAndCaptureText(processInfo); 284using var findCertificateProcess = Process.Start(new ProcessStartInfo( 354var processOutput = Process.RunAndCaptureText(processInfo);
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (6)
696return Process.Run(startInfo).ExitCode == 0; 718return Process.Run(startInfo).ExitCode == 0; 746return Process.Run(startInfo).ExitCode == 0; 769if (Process.Run(startInfo).ExitCode == 0) 939var processOutput = Process.RunAndCaptureText(processInfo); 981var processOutput = Process.RunAndCaptureText(processInfo);
Microsoft.AspNetCore.InternalTesting (4)
CollectDumpAttribute.cs (2)
31var process = Process.GetCurrentProcess();
DumpCollector\DumpCollector.cs (1)
11public static void Collect(Process process, string fileName)
DumpCollector\DumpCollector.Windows.cs (1)
16internal static void Collect(Process process, string outputFile)
Microsoft.AspNetCore.Server.IntegrationTesting (17)
ApplicationPublisher.cs (1)
74var hostProcess = new Process() { StartInfo = startInfo };
Common\ProcessLoggingExtensions.cs (1)
10public static void StartAndCaptureOutAndErrToLogger(this Process process, string prefix, ILogger logger)
Deployers\ApplicationDeployer.cs (1)
115protected void ShutDownIfAnyHostProcess(Process hostProcess)
Deployers\NginxDeployer.cs (3)
114using (var process = new Process 169using (var runNginx = new Process() { StartInfo = startInfo }) 211using (var runNginx = new Process() { StartInfo = startInfo })
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
247using (var runScriptsOnRemoteServerProcess = new Process() { StartInfo = startInfo })
Deployers\SelfHostDeployer.cs (1)
20public Process HostProcess { get; private set; }
src\aspnetcore\src\Shared\Process\ProcessEx.cs (5)
24private readonly Process _process; 35public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 68public Process Process => _process; 143var proc = Process.Start(startInfo);
src\aspnetcore\src\Shared\Process\ProcessExtensions.cs (4)
16public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 18public static void KillTree(this Process process, TimeSpan timeout) 106var process = Process.Start(startInfo);
Microsoft.AspNetCore.Server.Kestrel.Core (13)
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (7)
106var exitStatus = Process.Run(new ProcessStartInfo(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)); 170var checkTrustProcessOutput = Process.Run(checkTrustProcessStartInfo); 216var processExitStatus = Process.Run(processInfo); 257var processOutput = Process.RunAndCaptureText(processInfo); 284using var findCertificateProcess = Process.Start(new ProcessStartInfo( 354var processOutput = Process.RunAndCaptureText(processInfo);
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (6)
696return Process.Run(startInfo).ExitCode == 0; 718return Process.Run(startInfo).ExitCode == 0; 746return Process.Run(startInfo).ExitCode == 0; 769if (Process.Run(startInfo).ExitCode == 0) 939var processOutput = Process.RunAndCaptureText(processInfo); 981var processOutput = Process.RunAndCaptureText(processInfo);
Microsoft.AspNetCore.SpaProxy (6)
SpaProxyLaunchManager.cs (6)
19private Process? _spaProcess; 199_spaProcess = Process.Start(info); 246var stopProcess = Process.Start(stopScriptInfo); 308var stopProcess = Process.Start(stopScriptInfo);
Microsoft.AspNetCore.SpaServices.Extensions (4)
Npm\NodeScriptRunner.cs (4)
19private Process? _npmProcess; 123private static Process LaunchNodeProcess(ProcessStartInfo startInfo, string commandName) 127var process = Process.Start(startInfo)!;
Microsoft.Build (58)
BackEnd\BuildManager\BuildManager.cs (6)
534private void UpdatePriority(Process p, ProcessPriorityClass priority) 569IEnumerable<Process>? processes = _nodeManager?.GetProcesses(); 572foreach (Process p in processes) 581foreach (Process p in processes) 1041/// <returns>Enumeration of <see cref="Process"/> objects that were valid during the time of call to this function.</returns> 1042public IEnumerable<Process> GetWorkerProcesses()
BackEnd\BuildManager\CoordinatorClient.cs (2)
507Process? process = Process.Start(startInfo);
BackEnd\Client\MSBuildClient.cs (3)
559using Process msbuildProcess = nodeLauncher.Start(launchData, nodeId: 0); 847using Process launched = Process.GetProcessById(pid);
BackEnd\Components\Communications\INodeLauncher.cs (1)
38Process Start(NodeLaunchData launchData, int nodeId);
BackEnd\Components\Communications\INodeManager.cs (1)
56IEnumerable<Process> GetProcesses();
BackEnd\Components\Communications\INodeProvider.cs (1)
91IEnumerable<Process> GetProcesses();
BackEnd\Components\Communications\NodeLauncher.cs (7)
50public Process Start(NodeLaunchData launchData, int nodeId) 60private Process StartInternal(NodeLaunchData nodeLaunchData) 114private Process StartProcessUnix(NodeLaunchData nodeLaunchData, string exeName, bool redirectStreams, bool isNativeAppHost) 137Process process = Process.Start(processStartInfo); 326private static Process DisableMSBuildServer(Func<Process> func)
BackEnd\Components\Communications\NodeManager.cs (1)
352public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
469public IEnumerable<Process> GetProcesses() => throw new NotImplementedException();
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
212public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (28)
173List<Process> nodeProcesses = GetPossibleRunningNodes().nodeProcesses.ToList(); 179nodeProcesses.AddRange(Process.GetProcessesByName(Path.GetFileNameWithoutExtension(msbuildtaskhostExeName))); 182foreach (Process nodeProcess in nodeProcesses) 208internal static NodeContext RequestNodeShutdown(Process nodeProcess, Stream nodeStream, NodeContextTerminateDelegate terminateNode, byte negotiatedVersion) 293ConcurrentQueue<Process> possibleRunningNodes = null; 301IList<Process> possibleRunningNodesList; 305possibleRunningNodes = new ConcurrentQueue<Process>(possibleRunningNodesList); 356while (possibleRunningNodes != null && possibleRunningNodes.TryDequeue(out var nodeToReuse)) 455Process msbuildProcess = nodeLauncher.Start(launchData, nodeId); 503void CreateNodeContext(int nodeId, Process nodeToReuse, Stream nodeStream, byte negotiatedVersion) 531private (string expectedProcessName, IList<Process> nodeProcesses) GetPossibleRunningNodes( 545List<Process> processes = new(); 550processes.AddRange(Process.GetProcessesByName(name)); 651private static IList<Process> FilterProcessesByNodeMode(List<Process> processes, NodeMode expectedNodeMode, string expectedProcessName) 655List<Process> filtered = new(capacity: processes.Count); 657foreach (Process process in processes) 798(_, IList<Process> nodeProcesses) = GetPossibleRunningNodes(nodeMode); 800foreach (var process in nodeProcesses) 813private static (string expectedProcessName, IList<Process> nodeProcesses) GetPossibleRunningNodes(NodeMode? expectedNodeMode) 817Process[] processes; 820processes = Process.GetProcessesByName(expectedProcessName); 824return (expectedProcessName, Array.Empty<Process>()); 829List<Process> filteredProcesses = []; 831foreach (var process in processes) 1023private readonly Process _process; 1025internal Process Process { get { return _process; } } 1126Process process,
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
1380public IEnumerable<Process> GetProcesses() => _nodeContexts.Values.Select(context => context.Process);
BackEnd\Components\Communications\TaskHostNodeManager.cs (1)
182IEnumerable<Process> INodeManager.GetProcesses()
BackEnd\Node\OutOfProcNode.cs (2)
894using Process currentProcess = Process.GetCurrentProcess();
Evaluation\ProjectRootElementCache.cs (1)
685Trace.WriteLine($"{prefix} {Process.GetCurrentProcess().Id} | {message}{param1}");
Instance\TaskFactories\TaskHostTask.cs (1)
448Process.GetCurrentProcess().Id,
Microsoft.Build.Framework (12)
BackEnd\Handshake.cs (2)
126using var currentProcess = Process.GetCurrentProcess();
EnvironmentUtilities.cs (2)
90using Process currentProcess = Process.GetCurrentProcess();
Telemetry\CrashTelemetry.cs (4)
443using var process = System.Diagnostics.Process.GetCurrentProcess(); 467using var process = System.Diagnostics.Process.GetCurrentProcess();
Utilities\ProcessExtensions.cs (4)
31public static void KillTree(this Process process, int timeoutMilliseconds) 70public static bool TryGetCommandLine(this Process? process, out string? commandLine) 91public static bool TryGetCommandLine(this Process? process, CommandLineSource source, out string? commandLine) 225/// Do not attempt to retrieve the command line. Default behavior; <see cref="TryGetCommandLine(Process?, out string?)"/>
Microsoft.Build.Tasks.CodeAnalysis (5)
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
509using var innerLogger = new CompilerServerLogger($"MSBuild {Process.GetCurrentProcess().Id}", TaskEnvironment.BuildEnvironment);
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
173using var process = Process.GetProcessById(serverProcessId); 673if (Process.Start(startInfo) is { } process)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
181var processId = Process.GetCurrentProcess().Id;
Microsoft.Build.Tasks.Core (2)
ManifestUtil\SecurityUtil.cs (2)
817Process signTool = null; 821signTool = Process.Start(startInfo);
Microsoft.Build.Utilities.Core (10)
ToolTask.cs (10)
361/// Overridable function called after <see cref="Process.Start()"/> in <see cref="ExecuteTool"/> 730/// <param name="proc">Fully populated <see cref="Process"/> instance representing the tool process to be started.</param> 731/// <returns>A started process. This could be <paramref name="proc"/> or another <see cref="Process"/> instance.</returns> 732protected virtual Process StartToolProcess(Process proc) 757Process proc = null; 931private void HandleToolNotifications(Process proc) 1030private void KillToolProcessOnTimeout(Process proc, bool isBeingCancelled) 1073private void TerminateToolProcess(Process proc, bool isBeingCancelled) 1111private void WaitForProcessExit(Process proc)
Microsoft.CodeAnalysis.BuildClient.Package (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
173using var process = Process.GetProcessById(serverProcessId); 673if (Process.Start(startInfo) is { } process)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
181var processId = Process.GetCurrentProcess().Id;
Microsoft.CodeAnalysis.Workspaces (4)
Log\TraceSourceFaultEventSink.cs (2)
22using var currentProcess = Process.GetCurrentProcess();
Utilities\StandardHandleInheritance.cs (1)
13/// On Windows a <see cref="System.Diagnostics.Process"/> started with any redirected stream is created with
Workspace\Host\PersistentStorage\IPersistentStorageConfiguration.cs (1)
52var fileName = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.CodeAnalysis.Workspaces.MSBuild (11)
MSBuild\BuildHostProcessManager.cs (8)
32private readonly Action<Process>? _beforeKillHungBuildHostProcess; 48Action<Process>? beforeKillHungBuildHostProcess = null) 124var process = Process.Start(processStartInfo); 455private readonly Process _process; 456private readonly Action<Process>? _beforeKillHungBuildHostProcess; 468public BuildHostProcess(Process process, ILoggerFactory? loggerFactory, Action<Process>? beforeKillHungBuildHostProcess)
MSBuild\MSBuildProjectLoader.cs (2)
33private Action<Process>? _beforeKillHungBuildHostProcess; 83public void SetBeforeKillHungBuildHostProcess(Action<Process>? beforeKillHungBuildHostProcess)
MSBuild\MSBuildWorkspace.cs (1)
105public void SetBeforeKillHungBuildHostProcess(Action<Process>? beforeKillHungBuildHostProcess)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\roslyn\src\Workspaces\Core\Portable\Utilities\StandardHandleInheritance.cs (1)
13/// On Windows a <see cref="System.Diagnostics.Process"/> started with any redirected stream is created with
Microsoft.Data.Analysis.Tests (2)
parent\Microsoft.ML.TestFramework\BaseTestClass.cs (2)
81Process proc = Process.GetCurrentProcess();
Microsoft.Diagnostics.NETCore.Client (3)
DiagnosticsIpc\IpcTransport.cs (1)
493Process.GetProcessById(pid);
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (2)
428_tcpClientAddress = IpcTcpSocketEndPoint.NormalizeTcpIpEndPoint(string.IsNullOrEmpty(tcpClient) ? "127.0.0.1:" + string.Format("{0}", 56000 + (Process.GetCurrentProcess().Id % 1000)) : tcpClient); 1432_runtimeProcessId = (ulong)Process.GetCurrentProcess().Id;
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
170using var process = new Process { StartInfo = startInfo };
Microsoft.DotNet.Cli.InternalMicrosoft (1)
Internal\InternalMicrosoftDetectionContext.cs (1)
197using var process = new Process
Microsoft.DotNet.Cli.Utils (9)
Command.cs (3)
8public class Command(Process? process, bool trimTrailingNewlines = false, IDictionary<string, string?>? customEnvironmentVariables = null) : ICommand 10private readonly Process _process = process ?? throw new ArgumentNullException(nameof(process)); 28public CommandResult Execute(Action<Process>? processStarted)
Extensions\ProcessStartInfoExtensions.cs (2)
14var process = new Process 37var process = new Process
ProcessReaper.cs (4)
33private readonly Process _process; 151public UnixProcessReaper(Process process) : base(process) 216public static ProcessReaper Create(Process process) 238private ProcessReaper(Process process)
Microsoft.DotNet.HotReload.Watch (14)
Browser\BrowserLauncher.cs (1)
100using var browserProcess = ProcessRunner.TryStartProcess(processSpec, logger);
Process\ProcessRunner.cs (9)
13private sealed class ProcessState(Process process) : IDisposable 15public Process Process { get; } = process; 137internal static Process? TryStartProcess(ProcessSpec processSpec, ILogger logger) 144var process = new Process 235private async ValueTask TerminateProcessAsync(Process process, ProcessSpec processSpec, ProcessState state, ILogger logger) 258private static async ValueTask<bool> WaitForExitAsync(Process process, ProcessState state, TimeSpan? timeout, ILogger logger) 321private static void TerminateProcess(Process process, ProcessState state, ILogger logger, bool force) 343private static void TerminateWindowsProcess(Process process, ProcessState state, ILogger logger, bool force) 370private static void TerminateUnixProcess(Process process, ProcessState state, ILogger logger, bool force)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\KestrelWebSocketServer.cs (2)
92using var process = Process.Start(dotnetPath, "dev-certs https --check --quiet");
UI\PhysicalConsole.cs (2)
64using var process = Process.GetProcessById(processId);
Microsoft.DotNet.MacOsPkg.Core (1)
ExecuteHelper.cs (1)
23using (Process process = new Process { StartInfo = processStartInfo })
Microsoft.DotNet.StrongName (4)
Signing.cs (2)
111var process = Process.Start(new ProcessStartInfo()
Verification.cs (2)
152var process = Process.Start(new ProcessStartInfo()
Microsoft.Extensions.AI.Evaluation.Console (1)
Commands\ReportCommand.cs (1)
151_ = Process.Start(
Microsoft.Extensions.AI.Templates.Tests (2)
test\ProjectTemplates\Infrastructure\ProcessExtensions.cs (1)
11public static bool TryGetHasExited(this Process process)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
55using var process = new Process
Microsoft.Extensions.DataIngestion.MarkItDown (1)
MarkItDownReader.cs (1)
75using (Process process = new() { StartInfo = startInfo })
Microsoft.Extensions.DataIngestion.Tests (1)
Readers\MarkItDownConditionHelper.cs (1)
30using Process process = new() { StartInfo = startInfo };
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Interop\ProcessInfo.cs (2)
16foreach (var process in Process.GetProcesses())
Microsoft.Extensions.Hosting.WindowsServices (3)
Internal\Win32.cs (2)
14internal static unsafe Process? GetParentProcess() 31return Process.GetProcessById(procEntry.th32ParentProcessID);
WindowsServiceHelpers.cs (1)
32var parent = Internal.Win32.GetParentProcess();
Microsoft.Extensions.Http.Resilience.Tests (3)
BuildTransitive\GrpcNetClientFactoryVersionTargetTests.cs (3)
301using var process = Process.Start(processStartInfo) ?? throw new InvalidOperationException("Failed to start dotnet."); 320private static void KillProcess(Process process)
Microsoft.Extensions.Telemetry.Tests (1)
Enrichment\ProcessLogEnricherTests.cs (1)
17private readonly int _processId = System.Diagnostics.Process.GetCurrentProcess().Id;
Microsoft.ML.AutoML (4)
AutoMLExperiment\IPerformanceMonitor.cs (4)
81_totalCpuProcessorTime = Process.GetCurrentProcess().TotalProcessorTime; 120using (var process = Process.GetCurrentProcess()) 122var currentCpuProcessorTime = Process.GetCurrentProcess().TotalProcessorTime;
Microsoft.ML.CodeGenerator (3)
Utils.cs (3)
195var proc = new System.Diagnostics.Process(); 221var proc = new System.Diagnostics.Process(); 242var proc = new System.Diagnostics.Process();
Microsoft.ML.Data (2)
Utilities\TimerScope.cs (2)
36long physicalMemoryUsageInMB = System.Diagnostics.Process.GetCurrentProcess().PeakWorkingSet64 / 1024 / 1024; 39long virtualMemoryUsageInMB = System.Diagnostics.Process.GetCurrentProcess().PeakVirtualMemorySize64 / 1024 / 1024;
Microsoft.ML.FastTree (3)
FastTree.cs (2)
452Process currentProcess = Process.GetCurrentProcess();
GamModelParameters.cs (1)
956System.Diagnostics.Process.Start(uri.AbsoluteUri + "content/GamViz/");
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
226var p = new System.Diagnostics.Process
Microsoft.ML.TestFramework (3)
BaseTestClass.cs (2)
81Process proc = Process.GetCurrentProcess();
CopyAction.cs (1)
47if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "dotnet")
Microsoft.NET.Build.Containers (8)
LocalDaemons\ContainerRuntimeOperations.cs (2)
61Task<ProcessTextOutput> loadTask = Process.RunAndCaptureTextAsync(loadInfo, processCancellation.Token); 206ProcessTextOutput output = await Process.RunAndCaptureTextAsync(startInfo, cancellationToken).ConfigureAwait(false);
LocalDaemons\ContainerRuntimes.cs (1)
141Process process = new()
LocalDaemons\DockerCli.cs (5)
112using Process? loadProcess = Process.Start(loadInfo) ?? 203Process proc = new() 667using var process = Process.Start(psi)!;
Microsoft.NET.HostModel (2)
HostModelUtils.cs (2)
93using (var p = Process.Start(psi))
Microsoft.NET.ProjectData (3)
Donor\ProjectDataDonorIndex.Git.cs (1)
117 using Process process = new()
Donor\ProjectDataDonorIndex.Serialization.cs (2)
141 using Process process = Process.GetCurrentProcess();
Microsoft.NET.ProjectData.Tasks (2)
src\roslyn\src\ProjectData\Microsoft.NET.ProjectData\Donor\ProjectDataDonorIndex.Serialization.cs (2)
141 using Process process = Process.GetCurrentProcess();
Microsoft.NET.Sdk.Publish.Tasks (2)
Tasks\GenerateEFSQLScripts.cs (2)
79private Process? _runningProcess; 97Process? proc = null;
Microsoft.NET.Sdk.Razor.Tasks (1)
parent\Tool\ServerProtocol\ServerConnection.cs (1)
405processId = Process.StartAndForget(startInfo);
Microsoft.TemplateEngine.Cli (5)
IReporterExtensions.cs (1)
28internal static void WriteCommandOutput(this IReporter reporter, Process process)
PostActionProcessors\ChmodPostActionProcessor.cs (2)
42Process? commandResult = System.Diagnostics.Process.Start(new ProcessStartInfo
PostActionProcessors\ProcessStartPostActionProcessor.cs (2)
53Process? commandResult = System.Diagnostics.Process.Start(new ProcessStartInfo
Microsoft.TestPlatform.Build (4)
Tasks\VSTestTask.cs (4)
56var currentProcess = Process.GetCurrentProcess(); 87using var activeProcess = new Process { StartInfo = processInfo }; 101Process.GetProcessById(_activeProcessId).Kill();
Microsoft.TestPlatform.CrossPlatEngine (1)
EventHandlers\TestRequestHandler.cs (1)
112var currentProcessPath = Process.GetCurrentProcess().MainModule?.FileName;
Microsoft.TestPlatform.Extensions.BlameDataCollector (43)
BlameCollector.cs (2)
316var p = Process.GetProcessById(_testHostProcessId);
MiniDumpWriteDump.cs (1)
25public static void CollectDumpUsingMiniDumpWriteDump(Process process, string outputFile, MiniDumpTypeOption type)
NetClientHangDumper.cs (4)
24var process = Process.GetProcessById(processId); 61foreach (var p in bottomUpTree) 111foreach (var p in bottomUpTree)
ProcDumpDumper.cs (8)
37private Process? _procDumpProcess; 42private Process? _process; 118_process = Process.GetProcessById(processId); 148_procDumpProcess = (Process)_processHelper.LaunchProcess( 291var process = Process.GetProcessById(processId); 318var procDumpProcess = (Process)_processHelper.LaunchProcess(
ProcessCodeMethods.cs (12)
24public static void Suspend(this Process process) 44public static List<ProcessTreeNode> GetProcessTree(this Process process) 46var childProcesses = Process.GetProcesses() 51foreach (var c in childProcesses) 79internal static int GetParentPid(Process process) 90internal static int GetParentPidWindows(Process process) 111internal static int GetParentPidLinux(Process process) 133internal static int GetParentPidMacOs(Process process) 139Process ps = new(); 167private static void ResolveChildren(Process parent, List<ProcessTreeNode> acc, int level, int limit) 185private static bool IsChildCandidate(Process child, Process parent)
ProcessTreeNode.cs (2)
10public Process? Process { get; set; } 16public Process? ParentProcess { get; set; }
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (7)
60ConsoleOutput.Instance.WriteLine($"Attaching Visual Studio with PID {vsPid} to the process '{Process.GetCurrentProcess().ProcessName}({processId})'...", OutputLevel.Information); 63AttachVs(Process.GetCurrentProcess(), vsPid); 69private static bool AttachVs(Process process, int? vsPid) 90var attachVsProcess = Process.Start(vsAttachPath, $"{process.Id} {vsPid}"); 132var currentProcess = Process.GetCurrentProcess();
WindowsHangDumper.cs (7)
40var process = Process.GetProcessById(processId); 69foreach (var p in bottomUpTree) 83foreach (var p in bottomUpTree) 109internal static void CollectDump(IProcessHelper processHelper, Process process, string outputFile, DumpTypeOption type) 153var dumpMiniTool = (Process)new ProcessHelper().LaunchProcess(
Microsoft.TestPlatform.PlatformAbstractions (24)
common\System\ProcessHelper.cs (15)
24private readonly Process _currentProcess = Process.GetCurrentProcess(); 56var process = new Process(); 96process.OutputDataReceived += (sender, args) => outputCallBack(sender as Process, args.Data); 115errorCallback(sender as Process, args.Data); 126if (sender is Process p) 226/// all <see cref="Process.ErrorDataReceived"/> callbacks have completed - and therefore the captured 293return Process.GetProcessById(processId).ProcessName; 301if (process is Process proc && proc.HasExited) 321var process = processId == _currentProcess.Id ? _currentProcess : Process.GetProcessById(processId); 338if (process is Process proc && !proc.HasExited) 352var proc = process as Process; 374if (process is Process proc && !proc.HasExited)
common\Tracing\PlatformEqtTrace.cs (6)
337using var process = Process.GetCurrentProcess(); 408using var process = Process.GetCurrentProcess(); 427using var process = Process.GetCurrentProcess();
net462\System\ProcessHelper.cs (2)
64var process = processId == _currentProcess.Id ? _currentProcess : Process.GetProcessById(processId);
netcore\System\ProcessHelper.cs (1)
29return Process.GetProcessById(processId).SafeHandle.DangerousGetHandle();
Microsoft.TestPlatform.TestHostRuntimeProvider (8)
Hosting\DefaultTestHostManager.cs (4)
64private Process? _testHostProcess; 546_createNoNewWindow) as Process; 551_testHostProcess = Process.GetProcessById(processId); 566internal static void AdjustProcessPriorityBasedOnSettings(Process testHostProcess, IDictionary<string, string?>? testHostEnvironmentVariables)
Hosting\DotnetTestHostManager.cs (3)
72private Process? _testHostProcess; 965_createNoNewWindow) as Process; 970_testHostProcess = Process.GetProcessById(processId);
Hosting\TestHostManagerCallbacks.cs (1)
90if (process is Process p)
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (3)
VsTestConsoleProcessManager.cs (3)
58private Process? _process; 167_process = Process.Start(info); 241ExitCode = ((Process)sender!).ExitCode;
MSBuild (6)
XMake.cs (6)
650using Process currentProcess = Process.GetCurrentProcess(); 1594using Process currentProcess = Process.GetCurrentProcess(); 2591using Process currentProcess = Process.GetCurrentProcess();
MSBuild.Coordinator (2)
CoordinatorServer.cs (2)
602using Process process = Process.GetProcessById(processId);
NativeIntegrations.DockerCompose (1)
DockerCommand.cs (1)
20using var process = new Process
netstandard (1)
netstandard.cs (1)
665[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
NuGet.Build.Tasks (1)
StaticGraphRestoreTaskBase.cs (1)
117using (var process = new Process())
NuGet.CommandLine.XPlat (2)
Commands\Package\Update\PackageUpdateIO.cs (2)
130using var process = Process.Start(processStartInfo);
NuGet.Common (3)
Migrations\Migration1.cs (1)
201using (var proc = new Process())
RuntimeEnvironmentHelper.cs (2)
62using (var process = Process.GetCurrentProcess())
NuGet.Credentials (3)
PluginCredentialProvider.cs (3)
263using var process = Process.Start(startInfo); 317private static void Kill(Process p)
NuGet.PackageManagement (1)
Utility\UriHelper.cs (1)
44Process.Start(url.AbsoluteUri);
NuGet.Protocol (13)
Plugins\Logging\PluginLogger.cs (2)
155using (var process = Process.GetCurrentProcess())
Plugins\Logging\ProcessLogMessage.cs (2)
20using (var process = Process.GetCurrentProcess())
Plugins\PluginManager.cs (2)
409using (var process = Process.GetCurrentProcess())
Plugins\PluginProcess.cs (3)
19private readonly Process _process; 70_process = Process.GetCurrentProcess(); 178if (sender is Process process)
Plugins\RequestHandlers\MonitorNuGetProcessExitRequestHandler.cs (4)
22private readonly ConcurrentDictionary<int, Process> _processes; 39_processes = new ConcurrentDictionary<int, Process>(); 103Process? process = null; 107process = _processes.GetOrAdd(monitorRequest.ProcessId, pid => Process.GetProcessById(pid));
Pipelines.AppHost (8)
AppHost.cs (8)
72var getUserProcess = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo 107var getSubscriptionProcess = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo 142var getResourceGroupProcess = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo 180var assignRoleProcess = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
Pipelines.Library (2)
DistributedApplicationPipelineExtensions.cs (2)
80var publishProcess = Process.Start(new ProcessStartInfo
PresentationUI (4)
InstallationError.xaml.cs (1)
211Process Notepad = new Process();
MS\Internal\Documents\RightsManagementProvider.cs (2)
1341System.Diagnostics.Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
TenFeetInstallationError.xaml.cs (1)
215Process Notepad = new Process();
RepoTasks (13)
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (7)
106var exitStatus = Process.Run(new ProcessStartInfo(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)); 170var checkTrustProcessOutput = Process.Run(checkTrustProcessStartInfo); 216var processExitStatus = Process.Run(processInfo); 257var processOutput = Process.RunAndCaptureText(processInfo); 284using var findCertificateProcess = Process.Start(new ProcessStartInfo( 354var processOutput = Process.RunAndCaptureText(processInfo);
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (6)
696return Process.Run(startInfo).ExitCode == 0; 718return Process.Run(startInfo).ExitCode == 0; 746return Process.Run(startInfo).ExitCode == 0; 769if (Process.Run(startInfo).ExitCode == 0) 939var processOutput = Process.RunAndCaptureText(processInfo); 981var processOutput = Process.RunAndCaptureText(processInfo);
rzc (3)
ServerProtocol\ServerConnection.cs (1)
405processId = Process.StartAndForget(startInfo);
ShutdownCommand.cs (2)
59var process = Process.GetProcessById(response.ServerProcessId);
SelectTests (4)
GraphAffectedProjects.cs (2)
566using var process = Process.Start(startInfo)
Program.cs (2)
1348using var process = Process.Start(psi)
Stress.TelemetryService (4)
GaugeMetrics.cs (4)
15var process = Process.GetCurrentProcess(); 23var processes = Process.GetProcesses().ToList(); 25foreach (var process in processes)
SuperFileCheck (2)
Program.cs (2)
115using (var proc = Process.Start(startInfo))
System (1)
parent\ref\System.cs (1)
520[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
System.CodeDom (2)
System\CodeDom\Compiler\Executor.cs (2)
67using (Process p = Process.Start(psi))
System.Configuration.ConfigurationManager (2)
System\Configuration\ClientConfigPaths.cs (2)
75using (Process currentProcess = Process.GetCurrentProcess())
System.Diagnostics.PerformanceCounter (2)
System\Diagnostics\PerformanceCounterLib.cs (2)
1195Process p; 1212p = Process.Start(processStartInfo);
System.Diagnostics.Process (92)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (7)
69/// This API opens the handle immediately. In contrast, <see cref="Process.GetProcessById(int)"/> only checks whether 70/// the process is currently running; opening the process handle is deferred until <see cref="Process.SafeHandle"/> is accessed. 73/// On Windows, this API requests query/synchronize/terminate rights, while <see cref="Process.SafeHandle"/> requests 111/// This API opens the handle immediately. In contrast, <see cref="Process.TryGetProcessById(int, out Process)"/> only checks 112/// whether the process is currently running; opening the process handle is deferred until <see cref="Process.SafeHandle"/> is accessed. 115/// On Windows, this API requests query/synchronize/terminate rights, while <see cref="Process.SafeHandle"/> requests
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (1)
408filename = Process.GetPathToOpenFile() ?? throw new Win32Exception(Interop.Errors.ERROR_NO_ASSOCIATION, SR.UseShellExecuteNoOpenProgram);
System\Diagnostics\Process.cs (46)
90/// Initializes a new instance of the <see cref='System.Diagnostics.Process'/> class. 99if (GetType() == typeof(Process)) 551/// Gets or sets the properties to pass into the <see cref='System.Diagnostics.Process.Start(System.Diagnostics.ProcessStartInfo)'/> method for the <see cref='System.Diagnostics.Process'/>. 630/// Gets or sets whether the <see cref='System.Diagnostics.Process.Exited'/> 805/// Causes the <see cref="Process"/> component to wait the specified <paramref name="timeout"/> for the associated process to enter an idle state. 823/// No process is associated with this <see cref="Process"/> object. 990/// Returns a new <see cref='System.Diagnostics.Process'/> component given a process identifier and 994public static Process GetProcessById(int processId, string machineName) 1007/// Returns a new <see cref='System.Diagnostics.Process'/> component given the 1011public static Process GetProcessById(int processId) 1023/// Attempts to get a <see cref="Process"/> instance for an existing process with the specified process ID. 1026/// <param name="process">When this method returns <see langword="true"/>, contains a <see cref="Process"/> representing the opened process; otherwise, <see langword="null"/>.</param> 1032public static bool TryGetProcessById(int processId, [NotNullWhen(true)] out Process? process) 1049/// Creates an array of <see cref='System.Diagnostics.Process'/> components that are 1058public static Process[] GetProcessesByName(string? processName) 1068/// Creates an array of <see cref="Process"/> components that are associated with process resources on a 1074public static Process[] GetProcessesByName(string? processName, string machineName) 1085/// Creates a new <see cref='System.Diagnostics.Process'/> 1092public static Process[] GetProcesses() 1102/// Creates a new <see cref='System.Diagnostics.Process'/> 1110public static Process[] GetProcesses(string machineName) 1118private static Process[] CreateProcessArray(ArrayBuilder<ProcessInfo> processInfos, string machineName, bool isRemoteMachine) 1122Process[] processes = new Process[processInfos.Count]; 1135/// Returns a new <see cref='System.Diagnostics.Process'/> 1139public static Process GetCurrentProcess() 1146/// Raises the <see cref='System.Diagnostics.Process.Exited'/> event. 1187/// that has been cached inside the process component. After <see cref='System.Diagnostics.Process.Refresh'/> is called, the 1258/// Starts a process specified by the <see cref='System.Diagnostics.Process.StartInfo'/> property of this <see cref='System.Diagnostics.Process'/> 1260/// <see cref='System.Diagnostics.Process'/> . If a process resource is reused 1261/// rather than started, the reused process is associated with this <see cref='System.Diagnostics.Process'/> 1507/// document or application file. Associates the process resource with a new <see cref='System.Diagnostics.Process'/> 1514public static Process Start(string fileName) 1526/// with a new <see cref='System.Diagnostics.Process'/> 1533public static Process Start(string fileName, string? arguments) 1547public static Process Start(string fileName, IEnumerable<string> arguments) 1556/// Associates the process resource with a new <see cref='System.Diagnostics.Process'/> 1563public static Process? Start(ProcessStartInfo startInfo) 1567Process process = new Process(); 1631/// Instructs the <see cref='System.Diagnostics.Process'/> component to wait 1908/// Instructs the <see cref='System.Diagnostics.Process'/> component to start 1945/// Instructs the <see cref='System.Diagnostics.Process'/> component to start 1984/// Instructs the <see cref='System.Diagnostics.Process'/> component to cancel the asynchronous operation 2005/// Instructs the <see cref='System.Diagnostics.Process'/> component to cancel the asynchronous operation
System\Diagnostics\Process.NonUap.cs (11)
35private bool IsSelfOrDescendantOf(Process processOfInterest) 40Process[] allProcesses = GetProcesses(); 44var descendantProcesses = new Queue<Process>(); 45Process? current = this; 49foreach (Process candidate in current.GetChildProcesses(allProcesses)) 60foreach (Process process in allProcesses) 72private List<Process> GetChildProcesses(Process[]? processes = null) 77List<Process> childProcesses = new List<Process>(); 79foreach (Process possibleChildProcess in processes)
System\Diagnostics\Process.Scenarios.cs (2)
243using Process process = Start(startInfo)!; 321using Process process = Start(startInfo)!;
System\Diagnostics\Process.Unix.cs (9)
40public static Process Start(string fileName, string userName, SecureString password, string domain) 47public static Process Start(string fileName, string arguments, string userName, SecureString password, string domain) 117List<Process> stoppedProcesses = []; 138Process process = stoppedProcesses[i]; 168private bool StopTree(ref List<Exception>? exceptions, List<Process> stoppedProcesses) 192List<Process> children = GetChildProcesses(); 193foreach (Process childProcess in children) 378private bool IsParentOf(Process possibleChildProcess) 390private bool Equals(Process process)
System\Diagnostics\ProcessManager.Linux.cs (4)
41return Process.GetUntruncatedProcessName(procPid, ref stat); 58if (modules is not null && Process.GetExePath(procPid) is string exePath) 93processName = Process.GetUntruncatedProcessName(procPid, ref stat); 114ProcessName = processName ?? Process.GetUntruncatedProcessName(procPid, ref procFsStat) ?? string.Empty,
System\Diagnostics\ProcessStartInfo.cs (2)
19/// used in conjunction with the <see cref='System.Diagnostics.Process'/> 262/// causes <see cref="Process.Start(ProcessStartInfo)"/> to throw <see cref="PlatformNotSupportedException"/>.
System\Diagnostics\ProcessThread.Linux.cs (5)
44return Process.TicksToTimeSpan(stat.stime); 48private DateTime GetStartTime() => Process.BootTimeToDateTime(Process.TicksToTimeSpan(GetStat().starttime)); 63return Process.TicksToTimeSpan(stat.utime + stat.stime); 79return Process.TicksToTimeSpan(stat.utime);
System\Runtime\InteropServices\UnixProcessStartArguments.cs (3)
93/// <returns>A new <see cref="Process"/> instance associated with the started process.</returns> 101public static Process Start(ProcessStartInfo startInfo, Func<UnixProcessStartArguments, int> callback) 119Process process = new();
System\Runtime\InteropServices\WindowsProcessStartArguments.cs (2)
81/// <returns>A new <see cref="Process"/> instance associated with the started process.</returns> 86public static Process Start(ProcessStartInfo startInfo, Func<WindowsProcessStartArguments, nint> callback)
System.Diagnostics.TextWriterTraceListener (2)
System\Diagnostics\XmlWriterTraceListener.cs (2)
259using Process process = Process.GetCurrentProcess();
System.Net.Ping (3)
System\Net\NetworkInformation\Ping.PingUtility.cs (3)
18private Process GetPingProcess(IPAddress address, byte[] buffer, int timeout, PingOptions? options) 53using (Process p = GetPingProcess(address, buffer, timeout, options)) 78using Process pingProcess = GetPingProcess(address, buffer, timeout, options);
System.Windows.Forms (3)
System\Windows\Forms\Application.cs (3)
1457Process process = Process.GetCurrentProcess(); 1483Process.Start(currentStartInfo);
testhost (7)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (7)
60ConsoleOutput.Instance.WriteLine($"Attaching Visual Studio with PID {vsPid} to the process '{Process.GetCurrentProcess().ProcessName}({processId})'...", OutputLevel.Information); 63AttachVs(Process.GetCurrentProcess(), vsPid); 69private static bool AttachVs(Process process, int? vsPid) 90var attachVsProcess = Process.Start(vsAttachPath, $"{process.Id} {vsPid}"); 132var currentProcess = Process.GetCurrentProcess();
testhost.arm64 (7)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (7)
60ConsoleOutput.Instance.WriteLine($"Attaching Visual Studio with PID {vsPid} to the process '{Process.GetCurrentProcess().ProcessName}({processId})'...", OutputLevel.Information); 63AttachVs(Process.GetCurrentProcess(), vsPid); 69private static bool AttachVs(Process process, int? vsPid) 90var attachVsProcess = Process.Start(vsAttachPath, $"{process.Id} {vsPid}"); 132var currentProcess = Process.GetCurrentProcess();
testhost.x86 (7)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (7)
60ConsoleOutput.Instance.WriteLine($"Attaching Visual Studio with PID {vsPid} to the process '{Process.GetCurrentProcess().ProcessName}({processId})'...", OutputLevel.Information); 63AttachVs(Process.GetCurrentProcess(), vsPid); 69private static bool AttachVs(Process process, int? vsPid) 90var attachVsProcess = Process.Start(vsAttachPath, $"{process.Id} {vsPid}"); 132var currentProcess = Process.GetCurrentProcess();
UIAutomationClient (2)
MS\Internal\Automation\HwndProxyElementProvider.cs (2)
429System.Diagnostics.Process targetProcess = null; 432targetProcess = System.Diagnostics.Process.GetProcessById( pid );
UIAutomationClientSideProviders (4)
MS\Internal\AutomationProxies\Misc.cs (1)
1815string processName = System.Diagnostics.Process.GetProcessById((int)processId).ProcessName;
MS\Internal\AutomationProxies\WinEventTracker.cs (3)
475return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 494Process[] localByName = Process.GetProcessesByName("csrss");
vbc (5)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
173using var process = Process.GetProcessById(serverProcessId); 673if (Process.Start(startInfo) is { } process)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
181var processId = Process.GetCurrentProcess().Id;
src\roslyn\src\Compilers\VisualBasic\vbc\Program.cs (1)
33using var logger = new CompilerServerLogger($"vbc {Process.GetCurrentProcess().Id}", StandardBuildEnvironment.Instance);
VBCSCompiler (6)
src\roslyn\src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
70new ShutdownBuildResponse(Process.GetCurrentProcess().Id),
src\roslyn\src\Compilers\Server\VBCSCompiler\VBCSCompiler.cs (1)
22var identifier = $"VBCSCompiler {Process.GetCurrentProcess().Id}";
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
173using var process = Process.GetProcessById(serverProcessId); 673if (Process.Start(startInfo) is { } process)
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
181var processId = Process.GetCurrentProcess().Id;
vstest.console (8)
Processors\AeDebuggerArgumentProcessor.cs (1)
193is Process process)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (7)
60ConsoleOutput.Instance.WriteLine($"Attaching Visual Studio with PID {vsPid} to the process '{Process.GetCurrentProcess().ProcessName}({processId})'...", OutputLevel.Information); 63AttachVs(Process.GetCurrentProcess(), vsPid); 69private static bool AttachVs(Process process, int? vsPid) 90var attachVsProcess = Process.Start(vsAttachPath, $"{process.Id} {vsPid}"); 132var currentProcess = Process.GetCurrentProcess();
vstest.console.arm64 (8)
parent\vstest.console\Processors\AeDebuggerArgumentProcessor.cs (1)
193is Process process)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (7)
60ConsoleOutput.Instance.WriteLine($"Attaching Visual Studio with PID {vsPid} to the process '{Process.GetCurrentProcess().ProcessName}({processId})'...", OutputLevel.Information); 63AttachVs(Process.GetCurrentProcess(), vsPid); 69private static bool AttachVs(Process process, int? vsPid) 90var attachVsProcess = Process.Start(vsAttachPath, $"{process.Id} {vsPid}"); 132var currentProcess = Process.GetCurrentProcess();