53 instantiations of Process
ArgumentForwarding.Tests (1)
ArgumentForwardingTests.cs (1)
239var proc = new Process
Common (2)
Iot\Device\Common\ProcessRunner.cs (2)
125_process = new Process(); 257_process = new Process();
dotnet (3)
CommandFactory\CommandFactoryUsingResolver.cs (1)
102var _process = new Process
commands\dotnet-help\HelpCommand.cs (1)
79return new Process
Installer\Windows\InstallClientElevationContext.cs (1)
48_serverProcess = new Process
dotnet-format (1)
Utilities\ProcessRunner.cs (1)
76var process = new Process();
dotnet-user-jwts (1)
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
78using var process = new Process()
dotnet-user-secrets (1)
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
78using var process = new Process()
dotnet-watch (1)
Internal\ProcessRunner.cs (1)
98var process = new Process
dotnet-watch.Tests (1)
Utilities\AwaitableProcess.cs (1)
56_process = new Process
HelixTestRunner (1)
ProcessUtil.cs (1)
84using var process = new Process()
Interop.FunctionalTests (1)
H2SpecCommands.cs (1)
218using (var process = new Process())
InteropTests (2)
Helpers\ClientProcess.cs (1)
23_process = new Process();
Helpers\WebsiteProcess.cs (1)
28_process = new Process();
Iot.Device.Bindings (3)
ProcessRunner.cs (2)
125_process = new Process(); 257_process = new Process();
SystemClock.cs (1)
230using var process = new Process();
Microsoft.Arcade.Common (1)
Command.cs (1)
43_process = new Process()
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
WebViewManagerE2ETests.cs (1)
28var photinoProcess = new Process()
Microsoft.AspNetCore.Server.IntegrationTesting (6)
ApplicationPublisher.cs (1)
64var 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.AspNetCore.Server.IntegrationTesting.IIS (1)
IISExpressDeployer.cs (1)
193var process = new Process() { StartInfo = startInfo };
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Docker.cs (1)
197var process = new Process
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\Executable.cs (1)
35var process = new Process()
Microsoft.Build.CommandLine.UnitTests (2)
XMake_Tests.cs (2)
547using Process process = new() 591using Process process = new()
Microsoft.Build.UnitTests.Shared (1)
RunnerUtilities.cs (1)
109using (var p = new Process { EnableRaisingEvents = true, StartInfo = psi })
Microsoft.Build.Utilities.Core (1)
ToolTask.cs (1)
745proc = new Process();
Microsoft.DotNet.Arcade.Sdk.Tests (1)
Utilities\TestApp.cs (1)
87var process = new Process
Microsoft.DotNet.Build.Tasks.Feed (1)
src\common\GeneralUtils.cs (1)
277Process process = new Process
Microsoft.DotNet.Cli.Utils (2)
ProcessStartInfoExtensions.cs (2)
17var process = new Process 40var process = new Process
Microsoft.DotNet.Cli.Utils.Tests (1)
ProcessExtensionsTests.cs (1)
19using Process childProcess = new();
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
470return new RemoteInvokeHandle(options.Start ? Process.Start(psi) : new Process() { StartInfo = psi },
Microsoft.DotNet.Tools.Tests.Utilities (1)
Commands\TestCommand.cs (1)
152var process = new Process
Microsoft.NET.Build.Containers (1)
LocalDaemons\DockerCli.cs (1)
176Process proc = new()
Microsoft.NET.Sdk.Publish.Tasks (1)
Tasks\GenerateEFSQLScripts.cs (1)
102proc = new Process
Microsoft.NET.TestFramework (1)
Commands\SdkCommandSpec.cs (1)
29var process = new Process()
PresentationUI (2)
InstallationError.xaml.cs (1)
219Process Notepad = new Process();
TenFeetInstallationError.xaml.cs (1)
222Process Notepad = new Process();
Rtc (1)
SystemClock.cs (1)
230using var process = new Process();
SDDLTests (1)
Program.cs (1)
344Process p = new()
System.Diagnostics.Process (5)
System\Diagnostics\Process.cs (4)
1042return new Process(machineName, ProcessManager.IsRemoteMachine(machineName), processId, null); 1104processes[i] = new Process(machineName, isRemoteMachine, processInfo.ProcessId, processInfo); 1117return new Process(".", false, Environment.ProcessId, null); 1348Process process = new Process();
System\Diagnostics\Process.Linux.cs (1)
41processes.Add(new Process(machineName, isRemoteMachine: false, pid, processInfo));
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
48return new Process() { StartInfo = psi };
771 references to Process
AndroidAppBuilder (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
AppleAppBuilder (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
ArduinoCsCompiler (1)
MicroCompiler.cs (1)
41("System.Diagnostics.Process", typeof(System.Diagnostics.Process)),
ArgumentForwarding.Tests (1)
ArgumentForwardingTests.cs (1)
239var proc = new Process
ClientSample (2)
Program.cs (1)
17Console.WriteLine($"Ready for debugger to attach. Process ID: {Process.GetCurrentProcess().Id}");
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
Common (1)
Iot\Device\Common\ProcessRunner.cs (1)
23private Process? _process = null;
dotnet (11)
CommandFactory\CommandFactoryUsingResolver.cs (1)
102var _process = new Process
commands\dotnet-help\HelpCommand.cs (2)
47public static Process ConfigureProcess(string docUrl) 92var process = ConfigureProcess(docsLink);
commands\dotnet-workload\install\MsiInstallerBase.cs (1)
57protected bool IsParentProcessRunning => Process.GetProcessById(ParentProcess.Id) != null;
Installer\Windows\InstallClientElevationContext.cs (1)
19private Process _serverProcess;
Installer\Windows\InstallerBase.cs (3)
22public static readonly Process CurrentProcess; 67public static readonly Process ParentProcess; 203CurrentProcess = Process.GetCurrentProcess();
PerformanceLogEventSource.cs (2)
48Process currentProcess = Process.GetCurrentProcess();
Program.cs (1)
42TimeSpan startupTime = mainTimeStamp - Process.GetCurrentProcess().StartTime;
dotnet.Tests (10)
GivenDotnetRunIsInterrupted.cs (7)
31Process testProcess = null; 73Process child = null; 75Process testProcess = null; 85child = Process.GetProcessById(Convert.ToInt32(line)); 117Process child = null; 118Process testProcess = null; 128child = Process.GetProcessById(Convert.ToInt32(line));
GivenThatIWantToShowHelpForDotnetCommand.cs (3)
124var proc = HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build"); 132var proc = HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build"); 140var proc = HelpCommand.ConfigureProcess("https://aka.ms/dotnet-build");
dotnet-dev-certs (13)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
99using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 154using var checkTrustProcess = Process.Start(new ProcessStartInfo( 209using var process = Process.Start(processInfo); 252using (var process = Process.Start(processInfo)) 283using var findCertificateProcess = Process.Start(new ProcessStartInfo( 353using (var process = Process.Start(processInfo))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
dotnet-format (8)
Utilities\ProcessRunner.cs (8)
10public Process Process { get; } 15public ProcessResult(Process process, int exitCode, ReadOnlyCollection<string> outputLines, ReadOnlyCollection<string> errorLines) 26public Process Process { get; } 32public ProcessInfo(Process process, ProcessStartInfo startInfo, Task<ProcessResult> result) 46Process.Start(file); 58Action<Process>? onProcessStartHandler = null, 69Action<Process>? onProcessStartHandler = null, 76var process = new Process();
dotnet-getdocument (4)
Exe.cs (2)
39using var process = Process.Start(startInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
26Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}");
dotnet-new.IntegrationTests (2)
CommonTemplatesTests.cs (2)
143var process = Process.Start(new ProcessStartInfo()
dotnet-new3 (2)
Dotnet.cs (2)
148Process? p = Process.Start(_info);
dotnet-openapi (3)
Commands\BaseCommand.cs (2)
230using var process = Process.Start(startInfo);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
dotnet-sql-cache (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
dotnet-user-jwts (2)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
78using var process = new Process()
dotnet-user-secrets (2)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
78using var process = new Process()
dotnet-watch (9)
Browser\BrowserConnector.cs (3)
51((Process)sender).OutputDataReceived -= handler; 96using var browserProcess = Process.Start(info);
Browser\BrowserRefreshServer.cs (2)
293using var process = Process.Start(_options.MuxerPath, "dev-certs https --check --quiet");
Internal\ProcessRunner.cs (4)
96private static Process CreateProcess(ProcessSpec processSpec) 98var process = new Process 134private readonly Process _process; 138public ProcessState(Process process, IReporter reporter)
dotnet-watch.Tests (2)
Utilities\AwaitableProcess.cs (2)
17private Process _process; 40public Process Process => _process;
ExceptionHandlerSample (1)
StartupWithWebSocket.cs (1)
38await context.Response.WriteAsync($"Not a web socket request. PID: {Process.GetCurrentProcess().Id}");
GetDocument.Insider (2)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
26Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}");
HelixTestRunner (5)
ProcessUtil.cs (5)
32var process = Process.GetCurrentProcess(); 47var process = Process.GetProcessById(pid); 84using var process = new Process()
IIS.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IIS.LongTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IIS.NewHandler.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IIS.NewShim.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IIS.ShadowCopy.Tests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
IISExpress.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
52var process = Process.Start(startInfo);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (5)
159var hostProcess = deploymentResult.HostProcess; 239var hostingProcesses = Process.GetProcessesByName("dotnet") 240.Concat(Process.GetProcessesByName("iisexpress")) 241.Concat(Process.GetProcessesByName("w3wp")); 246foreach (var hostingProcess in hostingProcesses)
Interop.FunctionalTests (3)
H2SpecCommands.cs (3)
92using (var process = Process.Start(processOptions)) 218using (var process = new Process())
InteropTests (11)
Helpers\ClientProcess.cs (1)
13private readonly Process _process;
Helpers\WebsiteProcess.cs (1)
14private readonly Process _process;
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
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);
Iot.Device.Bindings (2)
ProcessRunner.cs (1)
23private Process? _process = null;
SystemClock.cs (1)
230using var process = new Process();
LibraryBuilder (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
Microsoft.Arcade.Common (1)
Command.cs (1)
18private readonly Process _process;
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\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
WebViewManagerE2ETests.cs (1)
28var photinoProcess = new Process()
Microsoft.AspNetCore.DeveloperCertificates.XPlat (12)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
99using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 154using var checkTrustProcess = Process.Start(new ProcessStartInfo( 209using var process = Process.Start(processInfo); 252using (var process = Process.Start(processInfo)) 283using var findCertificateProcess = Process.Start(new ProcessStartInfo( 353using (var process = Process.Start(processInfo))
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
ShutdownTests.cs (3)
131var process = Process.Start(startInfo); 135private static void WaitForExitOrKill(Process process)
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.HttpSys.FunctionalTests (4)
ServerTests.cs (4)
70using var process = Process.Start(psi); 107using var process = Process.Start(psi);
Microsoft.AspNetCore.Server.IntegrationTesting (17)
ApplicationPublisher.cs (1)
64var 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\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
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.IntegrationTesting.IIS (8)
IISDeployer.cs (2)
34public Process HostProcess { get; set; } 280HostProcess = Process.GetProcessById(workerProcess.ProcessId);
IISDeploymentResult.cs (2)
14public Process HostProcess { get; } 24Process hostProcess)
IISExpressDeployer.cs (3)
29private Process _hostProcess; 193var process = new Process() { StartInfo = startInfo }; 548private void GracefullyShutdownProcess(Process hostProcess)
ProcessTracker.cs (1)
54public static void Add(Process process)
Microsoft.AspNetCore.Server.Kestrel.Core (12)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
99using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 154using var checkTrustProcess = Process.Start(new ProcessStartInfo( 209using var process = Process.Start(processInfo); 252using (var process = Process.Start(processInfo)) 283using var findCertificateProcess = Process.Start(new ProcessStartInfo( 353using (var process = Process.Start(processInfo))
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
Docker.cs (2)
195private static (Process, ConcurrentQueue<string>) RunProcess(string fileName, string arguments, string prefix, ILogger logger) 197var process = new Process
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.AspNetCore.StaticFiles.Tests (1)
StaticFileMiddlewareTests.cs (1)
53Process.Start("ln", $"-s \"/tmp/{Path.GetRandomFileName()}\" \"{badLink}\"").WaitForExit();
Microsoft.AspNetCore.WebSockets.ConformanceTests (2)
Autobahn\Executable.cs (2)
35var process = new Process() 72private static void Cancel(Process process, TaskCompletionSource<int> tcs)
Microsoft.Build (59)
BackEnd\BuildManager\BuildManager.cs (6)
451private void UpdatePriority(Process p, ProcessPriorityClass priority) 474IEnumerable<Process> processes = _nodeManager?.GetProcesses(); 477foreach (Process p in processes) 486foreach (Process p in processes) 767Process currentProcess = Process.GetCurrentProcess();
BackEnd\Client\MSBuildClient.cs (1)
476Process msbuildProcess = nodeLauncher.Start(_msbuildLocation, string.Join(" ", msBuildServerOptions), nodeId: 0);
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
1426using (StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, @"EngineTrace_{0}.txt"), Process.GetCurrentProcess().Id), append: true))
BackEnd\Components\Communications\CurrentHost.cs (2)
38using (Process currentProcess = Process.GetCurrentProcess())
BackEnd\Components\Communications\INodeLauncher.cs (1)
10Process Start(string msbuildLocation, string commandLineArgs, 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)
38public Process Start(string msbuildLocation, string commandLineArgs, int nodeId) 48private Process StartInternal(string msbuildLocation, string commandLineArgs) 118Process process; 121process = Process.Start(processStartInfo); 190return Process.GetProcessById(childProcessId); 194private static Process DisableMSBuildServer(Func<Process> func)
BackEnd\Components\Communications\NodeManager.cs (1)
350public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
468public IEnumerable<Process> GetProcesses() => throw new NotImplementedException();
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
209public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (16)
149List<Process> nodeProcesses = GetPossibleRunningNodes().nodeProcesses.ToList(); 155nodeProcesses.AddRange(new List<Process>(Process.GetProcessesByName(Path.GetFileNameWithoutExtension(msbuildtaskhostExeName)))); 158foreach (Process nodeProcess in nodeProcesses) 223ConcurrentQueue<Process> possibleRunningNodes = null; 228IList<Process> possibleRunningNodesList; 230possibleRunningNodes = new ConcurrentQueue<Process>(possibleRunningNodesList); 265while (possibleRunningNodes != null && possibleRunningNodes.TryDequeue(out var nodeToReuse)) 268if (nodeToReuse.Id == Process.GetCurrentProcess().Id) 336Process msbuildProcess = nodeLauncher.Start(msbuildLocation, commandLineArgs, nodeId); 379void CreateNodeContext(int nodeId, Process nodeToReuse, Stream nodeStream) 395private (string expectedProcessName, IList<Process> nodeProcesses) GetPossibleRunningNodes(string msbuildLocation = null) 404var processes = Process.GetProcessesByName(expectedProcessName); 555private readonly Process _process; 557internal Process Process { get { return _process; } } 606public NodeContext(int nodeId, Process process,
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
610public IEnumerable<Process> GetProcesses()
BackEnd\Components\Communications\TaskHostNodeManager.cs (1)
173IEnumerable<Process> INodeManager.GetProcesses()
BackEnd\Components\Scheduler\Scheduler.cs (4)
2570StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerTrace_{0}.txt"), Process.GetCurrentProcess().Id), append: true); 2588using (StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true)) 2696using (StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true)) 2730using (StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true))
BackEnd\Node\OutOfProcNode.cs (2)
846ProcessPriorityClass priorityClass = Process.GetCurrentProcess().PriorityClass; 859Process.GetCurrentProcess().PriorityClass = lowPriority ? ProcessPriorityClass.Normal : ProcessPriorityClass.BelowNormal;
BuildEnvironmentHelper.cs (1)
434return Process.GetCurrentProcess().MainModule.FileName;
CommunicationsUtilities.cs (2)
111sessionId = Process.GetCurrentProcess().SessionId; 839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
Evaluation\ProjectRootElementCache.cs (1)
727Trace.WriteLine(prefix + " " + Process.GetCurrentProcess().Id + " | " + message + param1);
ExceptionHandling.cs (1)
353var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
NamedPipeUtil.cs (1)
15processId = Process.GetCurrentProcess().Id;
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.CommandLine.UnitTests (8)
MSBuildServer_Tests.cs (4)
55Pid = Process.GetCurrentProcess().Id; 118Process.GetProcessById(pidOfServerProcess).KillTree(1000); 249var serverProcess = Process.GetProcessById(pidOfServerProcess);
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
XMake_Tests.cs (3)
547using Process process = new() 591using Process process = new() 1554ProcessPriorityClass currentPriority = Process.GetCurrentProcess().PriorityClass;
Microsoft.Build.Engine (6)
LocalProvider\LocalNode.cs (2)
494new LocalCallDescriptorForInitializationComplete(Process.GetCurrentProcess().Id); 510if (Process.GetProcessById(parentProcessId).HasExited)
LocalProvider\LocalNodeProvider.cs (4)
455if (!Process.GetProcessById(processId).HasExited) 457Process.GetProcessById(processId).Kill(); 493if (!isInvalidProcessId && !Process.GetProcessById(nodeData[nodeId].ProcessId).HasExited) 688new LocalCallDescriptorForInitializeNode(environmentVariablesTable, nodeLoggers.ToArray(), nodeData[nodeIndex].NodeId, parentGlobalProperties, toolsetSearchLocations, Process.GetCurrentProcess().Id, startupDirectory);
Microsoft.Build.Engine.OM.UnitTests (8)
BuildEnvironmentHelper.cs (1)
434return Process.GetCurrentProcess().MainModule.FileName;
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
353var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.Engine.UnitTests (14)
BackEnd\BuildManager_Tests.cs (8)
348int numberProcsOriginally = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 352string shutdownProjectDirectory = Path.Combine(Path.GetTempPath(), String.Format(CultureInfo.InvariantCulture, "VSNodeShutdown_{0}_UnitTest", Process.GetCurrentProcess().Id)); 379int numberProcsAfterBuild = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 390int numberProcsAfterShutdown = (new List<Process>(Process.GetProcessesByName("MSBuild"))).Count; 456Assert.NotEqual(Process.GetCurrentProcess().Id, processId); // "Build is expected to be out-of-proc. In fact it was in-proc."
BackEnd\ProcessIdTask.cs (1)
25Pid = Process.GetCurrentProcess().Id;
BackEnd\SdkResultOutOfProc_Tests.cs (1)
192processId.ShouldNotBe(Process.GetCurrentProcess().Id);
BackEnd\TaskHostFactory_Tests.cs (3)
50Process.GetCurrentProcess().Id.ShouldNotBe<int>(pid); 53Process taskHostNode = Process.GetProcessById(pid);
Evaluation\Expander_Tests.cs (1)
2577Assert.Equal(System.Diagnostics.Process.GetCurrentProcess().Id, pid);
Microsoft.Build.Framework (6)
FileClassifier.cs (1)
120string processName = Process.GetCurrentProcess().MainModule.FileName;
NativeMethods.cs (4)
1186Process thisProcess; 1189thisProcess = Process.GetProcessById(processIdToKill); 1322foreach (Process possibleChildProcess in Process.GetProcesses())
Profiler\EvaluationIdProvider.cs (1)
17private static readonly long ProcessId = Process.GetCurrentProcess().Id;
Microsoft.Build.Framework.UnitTests (1)
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Microsoft.Build.Tasks.Core (10)
BuildEnvironmentHelper.cs (1)
434return Process.GetCurrentProcess().MainModule.FileName;
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
353var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
ManifestUtil\SecurityUtil.cs (2)
794Process signTool = null; 798signTool = Process.Start(startInfo);
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
55_dotnetCliPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
Microsoft.Build.Tasks.UnitTests (5)
Copy_Tests.cs (1)
1386engine.AssertLogContains(Process.GetCurrentProcess().Id.ToString()); // the file is locked by the current process
NativeMethodsShared_Tests.cs (1)
59Assert.Equal((uint)Process.GetCurrentProcess().Id, processId); // "Expected the .net processId to match the one from GetCurrentProcessId"
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
Unzip_Tests.cs (2)
169var process = Process.Start(psi);
Microsoft.Build.UnitTests.Shared (2)
RunnerUtilities.cs (1)
109using (var p = new Process { EnableRaisingEvents = true, StartInfo = psi })
TestEnvironment.cs (1)
633Process.GetProcessById(_processId).KillTree(1000);
Microsoft.Build.Utilities.Core (24)
BuildEnvironmentHelper.cs (1)
439return Process.GetCurrentProcess().MainModule.FileName;
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
353var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
ProcessExtensions.cs (1)
12public static void KillTree(this Process process, int timeoutMilliseconds)
ToolTask.cs (10)
357/// Overridable function called after <see cref="Process.Start()"/> in <see cref="ExecuteTool"/> 699/// <param name="proc">Fully populated <see cref="Process"/> instance representing the tool process to be started.</param> 700/// <returns>A started process. This could be <paramref name="proc"/> or another <see cref="Process"/> instance.</returns> 701protected virtual Process StartToolProcess(Process proc) 726Process proc = null; 876private void HandleToolNotifications(Process proc) 975private void KillToolProcessOnTimeout(Process proc, bool isBeingCancelled) 1019private void TerminateToolProcess(Process proc, bool isBeingCancelled) 1054private static void WaitForProcessExit(Process proc)
TrackedDependencies\FileTracker.cs (6)
662public static Process StartProcess(string command, string arguments, ExecutableType toolType, string dllName, string intermediateDirectory, string rootFiles, string cancelEventName) 667return Process.Start(GetTrackerPath(toolType), fullArguments); 680public static Process StartProcess(string command, string arguments, ExecutableType toolType, string dllName, string intermediateDirectory, string rootFiles) 692public static Process StartProcess(string command, string arguments, ExecutableType toolType, string intermediateDirectory, string rootFiles) 703public static Process StartProcess(string command, string arguments, ExecutableType toolType, string rootFiles) 713public static Process StartProcess(string command, string arguments, ExecutableType toolType)
Microsoft.Build.Utilities.UnitTests (3)
NativeMethodsShared_Tests.cs (1)
59Assert.Equal((uint)Process.GetCurrentProcess().Id, processId); // "Expected the .net processId to match the one from GetCurrentProcessId"
ProcessExtensions_Tests.cs (2)
24Process p = Process.Start(psi); // sleep 10m.
Microsoft.DotNet.Arcade.Sdk (2)
src\InstallDotNetCore.cs (2)
144var process = Process.Start(new ProcessStartInfo()
Microsoft.DotNet.Arcade.Sdk.Tests (1)
Utilities\TestApp.cs (1)
87var process = new Process
Microsoft.DotNet.Build.Tasks.Feed (2)
src\common\GeneralUtils.cs (2)
255private static System.Threading.Tasks.Task WaitForProcessExitAsync(Process process) 277Process process = new Process
Microsoft.DotNet.Cli.Utils (11)
Command.cs (3)
11private readonly Process _process; 21public Command(Process process, bool trimtrailingNewlines = false) 31public CommandResult Execute(Action<Process> processStarted)
Extensions\ProcessExtensions.cs (4)
24public static Process GetParentProcess(this Process process) 28return ppid != -1 ? Process.GetProcessById(ppid) : null; 36public static unsafe int GetParentProcessId(this Process process)
ProcessReaper.cs (2)
30public ProcessReaper(Process process) 191private Process _process;
ProcessStartInfoExtensions.cs (2)
17var process = new Process 40var process = new Process
Microsoft.DotNet.Cli.Utils.Tests (3)
ProcessExtensionsTests.cs (3)
17int expectedParentProcessId = Process.GetCurrentProcess().Id; 19using Process childProcess = new(); 23Process parentProcess = childProcess.GetParentProcess();
Microsoft.DotNet.MSBuildSdkResolver (1)
EnvironmentProvider.cs (1)
132currentProcessPath = Process.GetCurrentProcess().MainModule.FileName;
Microsoft.DotNet.NativeWrapper (1)
EnvironmentProvider.cs (1)
132currentProcessPath = Process.GetCurrentProcess().MainModule.FileName;
Microsoft.DotNet.Open.Api.Tools.Tests (8)
ProcessEx.cs (4)
18private readonly Process _process; 25private ProcessEx(ITestOutputHelper output, Process proc) 77var proc = Process.Start(startInfo);
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.DotNet.RemoteExecutor (9)
MiniDump.cs (1)
14public static void Create(Process process, string destinationPath)
RemoteExecutor.cs (2)
53string processFileName = Process.GetCurrentProcess().MainModule?.FileName; 470return new RemoteInvokeHandle(options.Start ? Process.Start(psi) : new Process() { StartInfo = psi },
RemoteInvokeHandle.cs (6)
21public RemoteInvokeHandle(Process process, RemoteInvokeOptions options, string assemblyName = null, string className = null, string methodName = null, IEnumerable<IDisposable> subDisposables = null) 40public Process Process { get; set; } 121foreach (Process p in Process.GetProcesses()) 129Process p = Process.Start(new ProcessStartInfo()
Microsoft.DotNet.SignTool (8)
src\BatchSignUtil.cs (2)
438var process = Process.Start(processStartInfo);
src\RealSignTool.cs (4)
51var process = Process.Start(new ProcessStartInfo() 105var process = Process.Start(new ProcessStartInfo()
src\SignTool.cs (2)
63var process = Process.Start(new ProcessStartInfo()
Microsoft.DotNet.Tools.Tests.Utilities (8)
Commands\TestCommand.cs (3)
17public Process CurrentProcess { get; private set; } 121private Process CreateProcess(string executable, string args) 152var process = new Process
Extensions\ProcessExtensions.cs (5)
17public static void KillTree(this Process process) => process.KillTree(_defaultTimeout); 19public static void KillTree(this Process process, TimeSpan timeout) 95var process = Process.Start(startInfo); 110public static Task StartAndWaitForExitAsync(this Process subject)
Microsoft.Extensions.ApiDescription.Client.Tests (10)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
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.Extensions.Caching.StackExchangeRedis.Tests (4)
Infrastructure\RedisTestConfig.cs (4)
20private static volatile Process _redisServerProcess; // null implies if server exists it was not started by this code 94var process = Process.GetProcessesByName(FunctionalTestsRedisServerExeName).SingleOrDefault(); 179_redisServerProcess = Process.Start(processInfo);
Microsoft.Extensions.Hosting.WindowsServices (3)
Internal\Win32.cs (2)
14internal static unsafe Process? GetParentProcess() 36return Process.GetProcessById(procEntry.th32ParentProcessID);
WindowsServiceHelpers.cs (1)
41var parent = Internal.Win32.GetParentProcess();
Microsoft.NET.Build.Containers (5)
LocalDaemons\DockerCli.cs (5)
88using Process? loadProcess = Process.Start(loadInfo); 176Process proc = new() 345using var process = Process.Start(psi)!;
Microsoft.NET.Sdk.Publish.Tasks (2)
Tasks\GenerateEFSQLScripts.cs (2)
75private Process _runningProcess; 93Process proc = null;
Microsoft.NET.Sdk.Razor.Tasks (2)
ServerConnection.cs (2)
396var process = Process.Start(startInfo);
Microsoft.NET.Sdk.Razor.Tool.Tests (3)
ServerCommandTest.cs (1)
17var expectedProcessId = Process.GetCurrentProcess().Id;
ServerLifecycleTest.cs (2)
106Assert.Equal(Process.GetCurrentProcess().Id, serverProcessId); 190Assert.Equal(Process.GetCurrentProcess().Id, processId);
Microsoft.NET.Sdk.WebAssembly.Pack.Tasks (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
Microsoft.NET.TestFramework (2)
Commands\SdkCommandSpec.cs (1)
29var process = new Process()
Commands\TestCommand.cs (1)
25public Action<Process> ProcessStartedHandler { get; set; }
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
MobileBuildTasks (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
MonoAOTCompiler (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
MonoTargetsTasks (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
MSBuild (21)
BuildEnvironmentHelper.cs (1)
439return Process.GetCurrentProcess().MainModule.FileName;
CommunicationsUtilities.cs (2)
111sessionId = Process.GetCurrentProcess().SessionId; 839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
DebugUtils.cs (3)
95Process.GetCurrentProcess().ProcessName.Contains(processNameToBreakInto); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
353var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
NamedPipeUtil.cs (1)
15processId = Process.GetCurrentProcess().Id;
OutOfProcTaskHostNode.cs (1)
814? File.CreateText(string.Format(CultureInfo.CurrentCulture, Path.Combine(FileUtilities.TempFileDirectory, @"MSBuild_NodeShutdown_{0}.txt"), Process.GetCurrentProcess().Id))
PerformanceLogEventListener.cs (1)
82_processIDStr = Process.GetCurrentProcess().Id.ToString();
XMake.cs (9)
423Process currentProcess = Process.GetCurrentProcess(); 619Process currentProcess = Process.GetCurrentProcess(); 1728Process.GetCurrentProcess().MainModule?.FileName ?? string.Empty), 2495Process currentProcess = Process.GetCurrentProcess(); 2518if (lowPriority && Process.GetCurrentProcess().PriorityClass != ProcessPriorityClass.Idle) 2520Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal;
MSBuildTaskHost (14)
BuildEnvironmentHelper.cs (1)
439return Process.GetCurrentProcess().MainModule.FileName;
CommunicationsUtilities.cs (2)
111sessionId = Process.GetCurrentProcess().SessionId; 839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
ExceptionHandling.cs (1)
353var pid = Process.GetCurrentProcess().Id;
FileUtilities.cs (2)
131cacheDirectory = Path.Combine(TempFileDirectory, String.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", Process.GetCurrentProcess().Id, AppDomain.CurrentDomain.Id)); 185File.WriteAllText(testFilePath, $"MSBuild process {Process.GetCurrentProcess().Id} successfully wrote to file.");
NamedPipeUtil.cs (1)
15processId = Process.GetCurrentProcess().Id;
NativeMethods.cs (4)
1186Process thisProcess; 1189thisProcess = Process.GetProcessById(processIdToKill); 1322foreach (Process possibleChildProcess in Process.GetProcesses())
OutOfProcTaskHost.cs (2)
93Process currentProcess = Process.GetCurrentProcess();
OutOfProcTaskHostNode.cs (1)
814? File.CreateText(string.Format(CultureInfo.CurrentCulture, Path.Combine(FileUtilities.TempFileDirectory, @"MSBuild_NodeShutdown_{0}.txt"), Process.GetCurrentProcess().Id))
netstandard (1)
netstandard.cs (1)
665[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
PresentationUI (4)
InstallationError.xaml.cs (1)
219Process Notepad = new Process();
MS\Internal\Documents\RightsManagementProvider.cs (2)
1362System.Diagnostics.Process currentProcess = System.Diagnostics.Process.GetCurrentProcess();
TenFeetInstallationError.xaml.cs (1)
222Process Notepad = new Process();
Rtc (1)
SystemClock.cs (1)
230using var process = new Process();
rzc (4)
ServerProtocol\ServerConnection.cs (2)
396var process = Process.Start(startInfo);
ShutdownCommand.cs (2)
59var process = Process.GetProcessById(response.ServerProcessId);
SDDLTests (1)
Program.cs (1)
344Process p = new()
Swaggatherer (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
System (1)
src\libraries\shims\System\ref\System.cs (1)
520[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Process))]
System.Device.Gpio (3)
System\Device\Gpio\Drivers\Libgpiod\V1\LibGpiodV1Driver.cs (1)
21private static string s_consumerName = Process.GetCurrentProcess().ProcessName;
System\Device\Gpio\Drivers\Libgpiod\V1\LibGpiodV1DriverEventHandler.cs (1)
17private static readonly string s_consumerName = Process.GetCurrentProcess().ProcessName;
System\Device\Gpio\Drivers\Libgpiod\V2\LibGpiodV2Driver.cs (1)
18private static readonly string ConsumerId = $"C#-{nameof(LibGpiodV2Driver)}-{Process.GetCurrentProcess().Id}";
System.Diagnostics.Process (71)
System\Diagnostics\Process.cs (40)
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'/>. 642/// Gets or sets whether the <see cref='System.Diagnostics.Process.Exited'/> 830/// Causes the <see cref="Process"/> component to wait the specified <paramref name="timeout"/> for the associated process to enter an idle state. 848/// No process is associated with this <see cref="Process"/> object. 1031/// Returns a new <see cref='System.Diagnostics.Process'/> component given a process identifier and 1035public static Process GetProcessById(int processId, string machineName) 1047/// Returns a new <see cref='System.Diagnostics.Process'/> component given the 1051public static Process GetProcessById(int processId) 1058/// Creates an array of <see cref='System.Diagnostics.Process'/> components that are 1067public static Process[] GetProcessesByName(string? processName) 1074/// Creates a new <see cref='System.Diagnostics.Process'/> 1081public static Process[] GetProcesses() 1088/// Creates a new <see cref='System.Diagnostics.Process'/> 1096public static Process[] GetProcesses(string machineName) 1100Process[] processes = new Process[processInfos.Length]; 1111/// Returns a new <see cref='System.Diagnostics.Process'/> 1115public static Process GetCurrentProcess() 1122/// Raises the <see cref='System.Diagnostics.Process.Exited'/> event. 1163/// that has been cached inside the process component. After <see cref='System.Diagnostics.Process.Refresh'/> is called, the 1230/// Starts a process specified by the <see cref='System.Diagnostics.Process.StartInfo'/> property of this <see cref='System.Diagnostics.Process'/> 1232/// <see cref='System.Diagnostics.Process'/> . If a process resource is reused 1233/// rather than started, the reused process is associated with this <see cref='System.Diagnostics.Process'/> 1288/// document or application file. Associates the process resource with a new <see cref='System.Diagnostics.Process'/> 1295public static Process Start(string fileName) 1307/// with a new <see cref='System.Diagnostics.Process'/> 1314public static Process Start(string fileName, string arguments) 1328public static Process Start(string fileName, IEnumerable<string> arguments) 1337/// Associates the process resource with a new <see cref='System.Diagnostics.Process'/> 1344public static Process? Start(ProcessStartInfo startInfo) 1348Process process = new Process(); 1416/// Instructs the <see cref='System.Diagnostics.Process'/> component to wait 1579/// Instructs the <see cref='System.Diagnostics.Process'/> component to start 1617/// Instructs the <see cref='System.Diagnostics.Process'/> component to start 1656/// Instructs the <see cref='System.Diagnostics.Process'/> component to cancel the asynchronous operation 1677/// Instructs the <see cref='System.Diagnostics.Process'/> component to cancel the asynchronous operation
System\Diagnostics\Process.Linux.cs (5)
19/// Creates an array of <see cref="Process"/> components that are associated with process resources on a 25public static Process[] GetProcessesByName(string? processName, string machineName) 31ArrayBuilder<Process> processes = default; 124/// It is the sum of the <see cref='System.Diagnostics.Process.UserProcessorTime'/> and 125/// <see cref='System.Diagnostics.Process.PrivilegedProcessorTime'/>.
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.Unix.cs (6)
43public static Process Start(string fileName, string userName, SecureString password, string domain) 50public static Process Start(string fileName, string arguments, string userName, SecureString password, string domain) 124List<Process> children = GetChildProcesses(); 137foreach (Process childProcess in children) 307private bool IsParentOf(Process possibleChildProcess) 319private bool Equals(Process process)
System\Diagnostics\ProcessManager.Linux.cs (2)
47if (Process.GetExePath(processId) is string exePath) 91ProcessName = processName ?? Process.GetUntruncatedProcessName(ref procFsStat) ?? string.Empty,
System\Diagnostics\ProcessStartInfo.cs (1)
16/// used in conjunction with the <see cref='System.Diagnostics.Process'/>
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\Diagnostics\ProcessWaitState.Unix.cs (1)
553Process.ConfigureTerminalForChildProcesses(-1, configureConsole);
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);
Templates.Blazor.Tests (22)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
99using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 154using var checkTrustProcess = Process.Start(new ProcessStartInfo( 209using var process = Process.Start(processInfo); 252using (var process = Process.Start(processInfo)) 283using var findCertificateProcess = Process.Start(new ProcessStartInfo( 353using (var process = Process.Start(processInfo))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
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);
Templates.Blazor.WebAssembly.Auth.Tests (34)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
99using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 154using var checkTrustProcess = Process.Start(new ProcessStartInfo( 209using var process = Process.Start(processInfo); 252using (var process = Process.Start(processInfo)) 283using var findCertificateProcess = Process.Start(new ProcessStartInfo( 353using (var process = Process.Start(processInfo))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Shared\E2ETesting\SauceConnectServer.cs (12)
27private Process _process; 29private Process _sentinelProcess; 50Process process, 52Process sentinelProcess) 106Process process = null; 107Process sentinel = null; 111process = Process.Start(psi); 191private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) 203return Process.Start(psi); 206private static void ProcessCleanup(Process process, string pidFilePath) 233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
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);
Templates.Blazor.WebAssembly.Tests (34)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
99using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 154using var checkTrustProcess = Process.Start(new ProcessStartInfo( 209using var process = Process.Start(processInfo); 252using (var process = Process.Start(processInfo)) 283using var findCertificateProcess = Process.Start(new ProcessStartInfo( 353using (var process = Process.Start(processInfo))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Shared\E2ETesting\SauceConnectServer.cs (12)
27private Process _process; 29private Process _sentinelProcess; 50Process process, 52Process sentinelProcess) 106Process process = null; 107Process sentinel = null; 111process = Process.Start(psi); 191private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) 203return Process.Start(psi); 206private static void ProcessCleanup(Process process, string pidFilePath) 233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
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);
Templates.Mvc.Tests (34)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
99using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 154using var checkTrustProcess = Process.Start(new ProcessStartInfo( 209using var process = Process.Start(processInfo); 252using (var process = Process.Start(processInfo)) 283using var findCertificateProcess = Process.Start(new ProcessStartInfo( 353using (var process = Process.Start(processInfo))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Shared\E2ETesting\SauceConnectServer.cs (12)
27private Process _process; 29private Process _sentinelProcess; 50Process process, 52Process sentinelProcess) 106Process process = null; 107Process sentinel = null; 111process = Process.Start(psi); 191private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) 203return Process.Start(psi); 206private static void ProcessCleanup(Process process, string pidFilePath) 233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
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);
Templates.Tests (34)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (12)
99using (var process = Process.Start(MacOSTrustCertificateCommandLine, MacOSTrustCertificateCommandLineArguments + tmpFile)) 154using var checkTrustProcess = Process.Start(new ProcessStartInfo( 209using var process = Process.Start(processInfo); 252using (var process = Process.Start(processInfo)) 283using var findCertificateProcess = Process.Start(new ProcessStartInfo( 353using (var process = Process.Start(processInfo))
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
src\Shared\E2ETesting\SauceConnectServer.cs (12)
27private Process _process; 29private Process _sentinelProcess; 50Process process, 52Process sentinelProcess) 106Process process = null; 107Process sentinel = null; 111process = Process.Start(psi); 191private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) 203return Process.Start(psi); 206private static void ProcessCleanup(Process process, string pidFilePath) 233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
src\Shared\Process\ProcessEx.cs (5)
25private readonly Process _process; 36public ProcessEx(ITestOutputHelper output, Process proc, TimeSpan timeout) 69public Process Process => _process; 130var proc = Process.Start(startInfo);
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);
TestExclusionListTasks (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
UIAutomationClient (2)
MS\Internal\Automation\HwndProxyElementProvider.cs (2)
441System.Diagnostics.Process targetProcess = null; 444targetProcess = System.Diagnostics.Process.GetProcessById( pid );
UIAutomationClientSideProviders (4)
MS\Internal\AutomationProxies\Misc.cs (1)
1838string processName = System.Diagnostics.Process.GetProcessById((int)processId).ProcessName;
MS\Internal\AutomationProxies\WinEventTracker.cs (3)
488return Misc.ProxyGetClassName(Process.GetProcessById(processId).MainWindowHandle).Equals("ConsoleWindowClass"); 507Process[] localByName = Process.GetProcessesByName("csrss");
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
25MuxerPath = TryFindMuxerPath(Process.GetCurrentProcess().MainModule?.FileName);
WasmAppBuilder (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);
WorkloadBuildTasks (2)
src\tasks\Common\Utils.cs (2)
174Process? process = Process.Start(processStartInfo);