264 references to Id
aspire (20)
Commands\AppHostLauncher.cs (3)
238logger.LogDebug("Child CLI process started with PID: {PID}", childProcess.Id); 331var pid = appHostInfo?.ProcessId ?? result.ChildProcess!.Id; 338result.ChildProcess!.Id,
DotNet\DotNetCliExecution.cs (9)
61_logger.LogDebug("Started dotnet with PID: {ProcessId}", _process.Id); 93_logger.LogDebug("Waiting for dotnet process to exit with PID: {ProcessId}", _process.Id); 102_logger.LogDebug("dotnet process with PID: {ProcessId} has not exited, killing it.", _process.Id); 110_logger.LogDebug("dotnet process with PID: {ProcessId} has exited with code: {ExitCode}", _process.Id, _process.ExitCode); 118_logger.LogDebug("Closing stdout/stderr streams for PID: {ProcessId}", _process.Id); 133_logger.LogWarning("Stream forwarders for PID {ProcessId} did not complete within timeout after stream close. Continuing anyway.", _process.Id); 137_logger.LogDebug("Pending forwarders for PID completed: {ProcessId}", _process.Id); 151_process.Id 164_process.Id,
Program.cs (1)
709mainActivity.AddTag(TelemetryConstants.Tags.ProcessPid, currentProcess.Id);
Projects\DotNetBasedAppHostServerProject.cs (2)
527_logger.LogDebug("AppHostServer({ProcessId}) stdout: {Line}", process.Id, e.Data); 535_logger.LogDebug("AppHostServer({ProcessId}) stderr: {Line}", process.Id, e.Data);
Projects\PrebuiltAppHostServer.cs (2)
489_logger.LogDebug("PrebuiltAppHostServer({ProcessId}) stdout: {Line}", process.Id, e.Data); 497_logger.LogDebug("PrebuiltAppHostServer({ProcessId}) stderr: {Line}", process.Id, e.Data);
Projects\ProcessGuestLauncher.cs (3)
81_logger.LogDebug("{Language}({ProcessId}) stdout: {Line}", _language, process.Id, e.Data); 95_logger.LogDebug("{Language}({ProcessId}) stderr: {Line}", _language, process.Id, e.Data); 109_logger.LogWarning("{Language}({ProcessId}): Timed out waiting for output streams to drain after process exit", _language, process.Id);
Aspire.Hosting (2)
Dcp\Process\ProcessUtil.cs (2)
107processSpec.OnStart?.Invoke(process.Id); 164sys_kill(_process.Id, sig: 2); // SIGINT
Aspire.Hosting.Azure (2)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (2)
107processSpec.OnStart?.Invoke(process.Id); 164sys_kill(_process.Id, sig: 2); // SIGINT
Aspire.Hosting.Docker (2)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (2)
107processSpec.OnStart?.Invoke(process.Id); 164sys_kill(_process.Id, sig: 2); // SIGINT
Aspire.Hosting.Tests (1)
Cli\CliOrphanDetectorTests.cs (1)
242builder.Configuration["ASPIRE_CLI_PID"] = fakeCliProcess.Id.ToString();
ClientSample (1)
Program.cs (1)
17Console.WriteLine($"Ready for debugger to attach. Process ID: {Process.GetCurrentProcess().Id}");
csc (3)
src\Compilers\CSharp\csc\Program.cs (1)
31using var logger = new CompilerServerLogger($"csc {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (1)
644processId = process.Id;
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
dotnet-svcutil-lib (4)
Shared\Utilities\DebugUtils.cs (1)
44Console.WriteLine("Process ID: {0}, Name:{1}", process.Id, process.ProcessName);
Shared\Utilities\ProcessRunner.cs (1)
114Console.WriteLine($"Starting process in the background: {Path.GetFileName(proc.ProcessName)}, ID: {proc.Id}.");
Shared\Utilities\SafeLogger.cs (2)
25return $"[{Process.GetCurrentProcess().Id}.{startTime.Millisecond}] {message}"; 31return $"[{Process.GetCurrentProcess().Id}.{startTime.Millisecond}] Time elapsed: {DateTime.Now - startTime}";
ExampleTask (1)
ExampleTask.cs (1)
23Log.LogMessage(MessageImportance.High, $"The task is executed in process: {executingProcess} with id {currentProcess.Id}");
ExceptionHandlerSample (1)
StartupWithWebSocket.cs (1)
38await context.Response.WriteAsync($"Not a web socket request. PID: {Process.GetCurrentProcess().Id}");
HelixTestRunner (8)
ProcessUtil.cs (8)
33var dumpFilePath = Path.Combine(dumpDirectoryPath, $"{process.ProcessName}-{process.Id}.dmp"); 35return CaptureDumpAsync(process.Id, dumpFilePath); 48var dumpFilePath = Path.Combine(dumpDirectoryPath, $"{process.ProcessName}.{process.Id}.dmp"); 50return CaptureDumpAsync(process.Id, dumpFilePath); 167onStart?.Invoke(process.Id); 181var dumpFilePath = Path.Combine(dumpDirectoryPath, $"{Path.GetFileName(filename)}.{process.Id}.dmp"); 183await CaptureDumpAsync(process.Id, dumpFilePath); 188sys_kill(process.Id, sig: 2); // SIGINT
IdeCoreBenchmarks (8)
ClassificationBenchmarks.cs (2)
60Console.WriteLine("Found Roslyn.slnx: " + Process.GetCurrentProcess().Id); 76Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
FindReferencesBenchmarks.cs (2)
59Console.WriteLine("Found Compilers.slnf: " + Process.GetCurrentProcess().Id); 75Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
IncrementalSourceGeneratorBenchmarks.cs (2)
62Console.WriteLine("Found Roslyn.slnx: " + Process.GetCurrentProcess().Id); 77Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
NavigateToBenchmarks.cs (2)
63Console.WriteLine("Found Roslyn.slnx: " + Process.GetCurrentProcess().Id); 78Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
IIS.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
102var processIdString = $"Process Id: {deploymentResult.HostProcess.Id}.";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
206$"{deploymentResult.HostProcess.Id}.log"); 248logger.LogError($"{hostingProcess.ProcessName} pid: {hostingProcess.Id} hasExited: {hostingProcess.HasExited.ToString()}");
IIS.LongTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
102var processIdString = $"Process Id: {deploymentResult.HostProcess.Id}.";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
206$"{deploymentResult.HostProcess.Id}.log"); 248logger.LogError($"{hostingProcess.ProcessName} pid: {hostingProcess.Id} hasExited: {hostingProcess.HasExited.ToString()}");
IIS.NewHandler.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
102var processIdString = $"Process Id: {deploymentResult.HostProcess.Id}.";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
206$"{deploymentResult.HostProcess.Id}.log"); 248logger.LogError($"{hostingProcess.ProcessName} pid: {hostingProcess.Id} hasExited: {hostingProcess.HasExited.ToString()}");
IIS.ShadowCopy.Tests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
102var processIdString = $"Process Id: {deploymentResult.HostProcess.Id}.";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
206$"{deploymentResult.HostProcess.Id}.log"); 248logger.LogError($"{hostingProcess.ProcessName} pid: {hostingProcess.Id} hasExited: {hostingProcess.HasExited.ToString()}");
IISExpress.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
102var processIdString = $"Process Id: {deploymentResult.HostProcess.Id}.";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
206$"{deploymentResult.HostProcess.Id}.log"); 248logger.LogError($"{hostingProcess.ProcessName} pid: {hostingProcess.Id} hasExited: {hostingProcess.HasExited.ToString()}");
InteropTests (3)
src\Shared\Process\ProcessEx.cs (2)
101public object Id => _process.Id; 199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running.");
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
Microsoft.AspNetCore.Hosting.FunctionalTests (1)
ShutdownTests.cs (1)
100SendSIGTERM(deployer.HostProcess.Id);
Microsoft.AspNetCore.InternalTesting (1)
DumpCollector\DumpCollector.Windows.cs (1)
23if (!NativeMethods.MiniDumpWriteDump(process.Handle, (uint)process.Id, stream.SafeFileHandle, NativeMethods.MINIDUMP_TYPE.MiniDumpWithFullMemory, ref exceptionInfo, IntPtr.Zero, IntPtr.Zero))
Microsoft.AspNetCore.Server.IntegrationTesting (9)
Deployers\ApplicationDeployer.cs (3)
119Logger.LogInformation("Attempting to cancel process {0}", hostProcess.Id); 125Logger.LogWarning("Unable to terminate the host process with process Id '{processId}", hostProcess.Id); 129Logger.LogInformation("Successfully terminated host process with process Id '{processId}'", hostProcess.Id);
Deployers\SelfHostDeployer.cs (3)
167Logger.LogInformation("host process ID {pid} shut down", HostProcess.Id); 186Logger.LogError("Host process {processName} {pid} exited with code {exitCode} or failed to start.", startInfo.FileName, HostProcess.Id, HostProcess.ExitCode); 190Logger.LogInformation("Started {fileName}. Process Id : {processId}", startInfo.FileName, HostProcess.Id);
src\Shared\Process\ProcessEx.cs (2)
101public object Id => _process.Id; 199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running.");
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (9)
IISExpressDeployer.cs (9)
225Logger.LogInformation("iisexpress Process {pid} shut down", process.Id); 233Logger.LogInformation("iisexpress Process {pid} started", process.Id); 237Logger.LogError("Host process {processName} {pid} exited with code {exitCode} or failed to start.", startInfo.FileName, process.Id, process.ExitCode); 247Logger.LogInformation("iisexpress Process {pid} failed to bind to port {port}, trying again", process.Id, port); 264Logger.LogInformation("Started iisexpress successfully. Process Id : {processId}, Port: {port}", _hostProcess.Id, port); 444throw new Exception($"iisexpress Process {_hostProcess.Id} failed to shutdown"); 560SendStopMessageToProcess(hostProcess.Id); 563throw new InvalidOperationException($"iisexpress Process {hostProcess.Id} failed to gracefully shutdown."); 573throw new InvalidOperationException($"iisexpress Process {hostProcess?.Id} crashed before shutdown was triggered.");
Microsoft.AspNetCore.SpaProxy (4)
SpaProxyLaunchManager.cs (4)
204LaunchStopScriptWindows(_spaProcess.Id); 208LaunchStopScriptMacOS(_spaProcess.Id); 251_logger.LogWarning($"The SPA process shutdown script '{stopProcess?.Id}' failed to start. The SPA proxy might" + 311_logger.LogWarning($"The SPA process shutdown script '{stopProcess?.Id}' failed to start. The SPA proxy might" +
Microsoft.Build (44)
BackEnd\Client\MSBuildClient.cs (1)
463CommunicationsUtilities.Trace("Server started with PID: {0}", msbuildProcess?.Id);
BackEnd\Components\Communications\NodeLauncher.cs (1)
144CommunicationsUtilities.Trace("Successfully launched {1} node with PID {0}", process.Id, exeName);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (41)
181Stream nodeStream = TryConnectToProcess(nodeProcess.Id, timeout, NodeProviderOutOfProc.GetHandshake(nodeReuse, false), out HandshakeResult result); 186nodeStream = TryConnectToProcess(nodeProcess.Id, timeout, NodeProviderOutOfProc.GetHandshake(nodeReuse, true), out result); 192CommunicationsUtilities.Trace("Shutting down node with pid = {0}", nodeProcess.Id); 332CommunicationsUtilities.Trace("Trying to connect to existing process {2} with id {1} to establish node {0}...", nodeId, nodeToReuse.Id, nodeToReuse.ProcessName); 333if (nodeToReuse.Id == currentProcessId) 339string nodeLookupKey = GetProcessesToIgnoreKey(nodeLaunchData.Handshake, nodeToReuse.Id); 349MSBuildEventSource.Log.NodePipeConnectStart(nodeId, nodeToReuse.Id); 350Stream nodeStream = TryConnectToProcess(nodeToReuse.Id, 0 /* poll, don't wait for connections */, nodeLaunchData.Handshake, out HandshakeResult result); 351MSBuildEventSource.Log.NodePipeConnectStop(nodeId, nodeToReuse.Id, succeeded: nodeStream != null); 355CommunicationsUtilities.Trace("Successfully connected to existed node {0} which is PID {1}", nodeId, nodeToReuse.Id); 356string msg = ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("NodeReused", nodeId, nodeToReuse.Id); 363MSBuildEventSource.Log.NodeConnectStop(nodeId, nodeToReuse.Id, isReused: true); 407MSBuildEventSource.Log.NodeLaunchStop(nodeId, msbuildProcess.Id); 409_processesToIgnore.TryAdd(GetProcessesToIgnoreKey(nodeLaunchData.Handshake, msbuildProcess.Id), default); 416MSBuildEventSource.Log.NodePipeConnectStart(nodeId, msbuildProcess.Id); 417Stream nodeStream = TryConnectToProcess(msbuildProcess.Id, TimeoutForNewNodeCreation, nodeLaunchData.Handshake, out HandshakeResult result); 418MSBuildEventSource.Log.NodePipeConnectStop(nodeId, msbuildProcess.Id, succeeded: nodeStream != null); 422CommunicationsUtilities.Trace("Successfully connected to created node {0} which is PID {1}", nodeId, msbuildProcess.Id); 425MSBuildEventSource.Log.NodeConnectStop(nodeId, msbuildProcess.Id, isReused: false); 435CommunicationsUtilities.Trace("Could not connect to node with PID {0}; it has exited with exit code {1}. This can indicate a crash at startup", msbuildProcess.Id, msbuildProcess.ExitCode); 441CommunicationsUtilities.Trace("Could not connect to node with PID {0}; it has exited with unknown exit code. This can indicate a crash at startup", msbuildProcess.Id); 447CommunicationsUtilities.Trace("Could not connect to node with PID {0}; it is still running. This can occur when two multiprocess builds run in parallel and the other one 'stole' this node", msbuildProcess.Id); 495Array.Sort(processes, static (left, right) => left.Id.CompareTo(right.Id)); 517CommunicationsUtilities.Trace("Skipping process {0} - unable to retrieve command line", process.Id); 525CommunicationsUtilities.Trace("Including process {0} - command line retrieval not supported on this platform", process.Id); 533CommunicationsUtilities.Trace("Including process {0} with matching NodeMode {1}", process.Id, processNodeMode.Value); 540process.Id, expectedNodeMode, 547CommunicationsUtilities.Trace("Skipping process {0} - error retrieving command line: {1}", process.Id, ex.Message); 551filtered.Sort(static (left, right) => left.Id.CompareTo(right.Id)); 717filteredProcesses.Sort((left, right) => left.Id.CompareTo(right.Id)); 721Array.Sort(processes, (left, right) => left.Id.CompareTo(right.Id)); 1237CommunicationsUtilities.Trace("Waiting for node with pid = {0} to exit", _process.Id); 1264_process.Id); 1265CommunicationsUtilities.Trace("Killing node with pid = {0}", _process.Id); 1274CommunicationsUtilities.Trace(_nodeId, "COMMUNICATIONS ERROR (HRC) Node: {0} Process: {1} Bytes Read: {2} Expected: {3}", _nodeId, _process.Id, bytesRead, _headerByte.Length); 1279CommunicationsUtilities.Trace(_nodeId, " Child Process {0} has exited.", _process.Id); 1283CommunicationsUtilities.Trace(_nodeId, " Child Process {0} is still running.", _process.Id);
Evaluation\ProjectRootElementCache.cs (1)
675Trace.WriteLine($"{prefix} {Process.GetCurrentProcess().Id} | {message}{param1}");
Microsoft.Build.CommandLine.UnitTests (1)
MSBuildServer_Tests.cs (1)
54Pid = Process.GetCurrentProcess().Id;
Microsoft.Build.Engine.UnitTests (11)
BackEnd\BuildManager_Tests.cs (2)
351string shutdownProjectDirectory = Path.Combine(Path.GetTempPath(), String.Format(CultureInfo.InvariantCulture, "VSNodeShutdown_{0}_UnitTest", Process.GetCurrentProcess().Id)); 455Assert.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\ProcessIdTaskSidecar.cs (1)
25Pid = Process.GetCurrentProcess().Id;
BackEnd\SdkResultOutOfProc_Tests.cs (1)
179processId.ShouldNotBe(Process.GetCurrentProcess().Id);
BackEnd\StringArrayWithNullsTask.cs (1)
28Pid = Process.GetCurrentProcess().Id;
BackEnd\TaskHostFactory_Tests.cs (3)
82Process.GetCurrentProcess().Id.ShouldNotBe(pid); 189Process.GetCurrentProcess().Id.ShouldNotBe(pid); 400Process.GetCurrentProcess().Id.ShouldNotBe(taskPid, "Task should have run in a separate TaskHost process");
Evaluation\Expander_Tests.cs (1)
2676Assert.Equal(System.Diagnostics.Process.GetCurrentProcess().Id, pid);
TestAssets\ExampleNetTask\ExampleTask\ExampleTask.cs (1)
23Log.LogMessage(MessageImportance.High, $"The task is executed in process: {executingProcess} with id {currentProcess.Id}");
Microsoft.Build.Framework (6)
NativeMethods.cs (3)
1444SafeProcessHandle childHandle = OpenProcess(eDesiredAccess.PROCESS_QUERY_INFORMATION, false, possibleChildProcess.Id); 1457int childParentProcessId = GetParentProcessId(possibleChildProcess.Id); 1463myChildren.Add(new KeyValuePair<int, SafeProcessHandle>(possibleChildProcess.Id, childHandle));
Utilities\ProcessExtensions.cs (3)
68commandLine = Windows.GetCommandLine(process.Id); 73commandLine = BSD.GetCommandLine(process.Id); 78commandLine = Linux.GetCommandLine(process.Id);
Microsoft.Build.Tasks.CodeAnalysis (3)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
509using var innerLogger = new CompilerServerLogger($"MSBuild {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (1)
644processId = process.Id;
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
Microsoft.Build.Tasks.CodeAnalysis.Sdk (3)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
509using var innerLogger = new CompilerServerLogger($"MSBuild {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (1)
644processId = process.Id;
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
Microsoft.Build.Tasks.UnitTests (2)
Copy_Tests.cs (1)
1415engine.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"
Microsoft.Build.UnitTests.Shared (2)
RunnerUtilities.cs (2)
184throw new TimeoutException($"Test failed due to timeout: process {p.Id} is active for more than {timeout.TotalSeconds} sec."); 192pid = p.Id;
Microsoft.Build.Utilities.UnitTests (1)
NativeMethodsShared_Tests.cs (1)
59Assert.Equal((uint)Process.GetCurrentProcess().Id, processId); // "Expected the .net processId to match the one from GetCurrentProcessId"
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
4808Assert.Equal(currentProcess.Id, int.Parse(match.Groups["pid"].Value));
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (2)
135int currentProcessId = Process.GetCurrentProcess().Id; 176newProcessId = newProcess.Id;
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
83telemetryReporter.ReportFault(eventName, description, (int)severity, forceDump, currentProcess.Id, exception);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
RoslynLanguageServer.cs (1)
26private static readonly Lazy<int> s_currentProcessId = new(static () => { using var process = Process.GetCurrentProcess(); return process.Id; });
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Services\Initialization\RemoteInitializationService.cs (1)
36return Process.GetCurrentProcess().Id;
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (2)
131var logMessage = $"[{currentProcess.ProcessName}:{currentProcess.Id}] Unexpected exception: {exception}"; 149faultUtility.AddProcessDump(currentProcess.Id);
Microsoft.CodeAnalysis.VisualBasic (1)
CommandLine\VisualBasicCommandLineParser.vb (1)
458Dim processId = System.Diagnostics.Process.GetCurrentProcess().Id
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\BuildHostProcessManager.cs (1)
439_logger = loggerFactory?.CreateLogger($"BuildHost PID {process.Id}");
Microsoft.DotNet.Open.Api.Tools.Tests (1)
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
Microsoft.DotNet.RemoteExecutor (5)
MiniDump.cs (1)
31if (MiniDumpWriteDump(process.SafeHandle, process.Id, fs.SafeFileHandle, MiniDumpType, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) == 0)
RemoteInvokeHandle.cs (4)
123description.AppendLine($"Process: {p.Id} {p.ProcessName} PrivateMemory: {p.PrivateMemorySize64}"); 157string miniDmpPath = Path.Combine(uploadPath, $"{Process.Id}.{Path.GetRandomFileName()}.dmp"); 171description.AppendLine($"\tProcess ID: {Process.Id}"); 184using (DataTarget dt = DataTarget.AttachToProcess(Process.Id, msecTimeout: 20_000)) // arbitrary timeout
Microsoft.Extensions.ApiDescription.Client.Tests (3)
src\Shared\Process\ProcessEx.cs (2)
101public object Id => _process.Id; 199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running.");
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
Microsoft.Extensions.Telemetry (1)
Enrichment\StaticProcessLogEnricher.cs (1)
27var pid = System.Diagnostics.Process.GetCurrentProcess().Id;
Microsoft.Extensions.Telemetry.Tests (1)
Enrichment\ProcessLogEnricherTests.cs (1)
17private readonly int _processId = System.Diagnostics.Process.GetCurrentProcess().Id;
Microsoft.VisualBasic.IntegrationTests (1)
InteractionTests.cs (1)
16Interaction.AppActivate(process.Id);
Microsoft.VisualStudio.Extensibility.Testing.Xunit (9)
src\VisualStudio\IntegrationTest\Harness\XUnitShared\Harness\IntegrationHelper.cs (1)
80displayNameProcessId == process.Id)
src\VisualStudio\IntegrationTest\Harness\XUnitShared\Harness\VisualStudioInstance.cs (6)
43var targetProcessId = Process.GetCurrentProcess().Id; 44var localProcess = debuggerHostDte?.Debugger.LocalProcesses.OfType<EnvDTE80.Process2>().FirstOrDefault(p => p.ProcessID == hostProcess.Id); 50var portName = $"IPC channel client for {HostProcess.Id}"; 121var currentProcessId = Process.GetCurrentProcess().Id; 137checkedProcesses.Add(process.Id); 142if (checkedProcesses.Contains(process.Id))
src\VisualStudio\IntegrationTest\Harness\XUnitShared\Harness\VisualStudioInstanceFactory.cs (2)
413_ = Task.Run(() => TakeSnapshotEveryTimeSpanUntilProcessExit(process, $"devenv{process.Id}")); 415Debug.WriteLine($"Launched a new instance of Visual Studio. (ID: {process.Id})");
Microsoft.VisualStudio.IntegrationTestService (3)
src\VisualStudio\IntegrationTest\Harness\IntegrationTestServiceShared\IntegrationService.cs (2)
25PortName = GetPortName(Process.GetCurrentProcess().Id); 55var uri = $"ipc://{GetPortName(hostProcess.Id)}/{typeof(IntegrationService).FullName}";
src\VisualStudio\IntegrationTest\Harness\IntegrationTestServiceShared\IntegrationTestServiceCommands.cs (1)
92{ "name", $"Microsoft.VisualStudio.IntegrationTest.ServiceChannel_{Process.GetCurrentProcess().Id}" },
Microsoft.VisualStudio.LanguageServices (4)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
55_vsProcessId = vsProcess.Id;
Telemetry\VisualStudioWorkspaceTelemetryService.cs (1)
63(service, cancellationToken) => service.InitializeTelemetrySessionAsync(Process.GetCurrentProcess().Id, settings, logDelta, cancellationToken),
Watson\FaultReporter.cs (2)
131var logMessage = $"[{currentProcess.ProcessName}:{currentProcess.Id}] Unexpected exception: {exception}"; 149faultUtility.AddProcessDump(currentProcess.Id);
MSBuildTaskHost (1)
Utilities\EnvironmentUtilities.cs (1)
25s_processId = processId = currentProcess.Id;
Replay (2)
src\Compilers\Shared\BuildServerConnection.cs (1)
644processId = process.Id;
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
RunTests (7)
ProcessRunner.cs (1)
37public int Id => Process.Id;
ProcessUtil.cs (2)
25ManagementObject mo = new ManagementObject("win32_process.handle='" + p.Id + "'"); 51if (parentId == parentProcess.Id)
Program.cs (4)
169Logger.Log($"### Begin {process.Id}"); 182Logger.Log($"### End {process.Id}"); 225ConsoleUtil.Write($"Dumping {name} {targetProcess.Id} to {dumpFilePath} ... "); 228var args = $"-accepteula -ma {targetProcess.Id} {dumpFilePath}";
Stress.TelemetryService (1)
GaugeMetrics.cs (1)
28measurements.Add(new Measurement<long>(workingSet, new KeyValuePair<string, object?>("process.id", process.Id)));
System.Diagnostics.Process (3)
System\Diagnostics\Process.Unix.cs (3)
307return Id == possibleChildProcess.ParentProcessId; 319return Id == process.Id;
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
448processId != process.Id)
Templates.Blazor.Tests (3)
src\Shared\Process\ProcessEx.cs (2)
101public object Id => _process.Id; 199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running.");
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
Templates.Blazor.WebAssembly.Auth.Tests (8)
src\Shared\E2ETesting\SauceConnectServer.cs (5)
199$"Write-Output 'Stopping process {process.Id}'; Stop-Process {process.Id}; }}" + 235var pidFile = Path.Combine(trackingFolder, $"{process.Id}.{Guid.NewGuid()}.pid"); 240await File.WriteAllTextAsync(pidFile, process.Id.ToString(CultureInfo.InvariantCulture)); 249throw new InvalidOperationException($"Failed to write file for process {process.Id}");
src\Shared\Process\ProcessEx.cs (2)
101public object Id => _process.Id; 199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running.");
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
Templates.Blazor.WebAssembly.Tests (8)
src\Shared\E2ETesting\SauceConnectServer.cs (5)
199$"Write-Output 'Stopping process {process.Id}'; Stop-Process {process.Id}; }}" + 235var pidFile = Path.Combine(trackingFolder, $"{process.Id}.{Guid.NewGuid()}.pid"); 240await File.WriteAllTextAsync(pidFile, process.Id.ToString(CultureInfo.InvariantCulture)); 249throw new InvalidOperationException($"Failed to write file for process {process.Id}");
src\Shared\Process\ProcessEx.cs (2)
101public object Id => _process.Id; 199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running.");
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
Templates.Mvc.Tests (8)
src\Shared\E2ETesting\SauceConnectServer.cs (5)
199$"Write-Output 'Stopping process {process.Id}'; Stop-Process {process.Id}; }}" + 235var pidFile = Path.Combine(trackingFolder, $"{process.Id}.{Guid.NewGuid()}.pid"); 240await File.WriteAllTextAsync(pidFile, process.Id.ToString(CultureInfo.InvariantCulture)); 249throw new InvalidOperationException($"Failed to write file for process {process.Id}");
src\Shared\Process\ProcessEx.cs (2)
101public object Id => _process.Id; 199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running.");
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
Templates.Tests (8)
src\Shared\E2ETesting\SauceConnectServer.cs (5)
199$"Write-Output 'Stopping process {process.Id}'; Stop-Process {process.Id}; }}" + 235var pidFile = Path.Combine(trackingFolder, $"{process.Id}.{Guid.NewGuid()}.pid"); 240await File.WriteAllTextAsync(pidFile, process.Id.ToString(CultureInfo.InvariantCulture)); 249throw new InvalidOperationException($"Failed to write file for process {process.Id}");
src\Shared\Process\ProcessEx.cs (2)
101public object Id => _process.Id; 199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running.");
src\Shared\Process\ProcessExtensions.cs (1)
20var pid = process.Id;
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\WinEventTracker.cs (1)
497_CSRSSProcessId = (uint)localByName[0].Id;
vbc (3)
src\Compilers\Shared\BuildServerConnection.cs (1)
644processId = process.Id;
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;
src\Compilers\VisualBasic\vbc\Program.cs (1)
33using var logger = new CompilerServerLogger($"vbc {Process.GetCurrentProcess().Id}");
VBCSCompiler (4)
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
70new ShutdownBuildResponse(Process.GetCurrentProcess().Id),
src\Compilers\Server\VBCSCompiler\VBCSCompiler.cs (1)
22using var logger = new CompilerServerLogger($"VBCSCompiler {Process.GetCurrentProcess().Id}", logFilePath);
src\Compilers\Shared\BuildServerConnection.cs (1)
644processId = process.Id;
src\Compilers\Shared\CompilerServerLogger.cs (1)
126var processId = Process.GetCurrentProcess().Id;