248 references to Id
Aspire.Hosting (2)
Dcp\Process\ProcessUtil.cs (2)
95processSpec.OnStart?.Invoke(process.Id); 152sys_kill(_process.Id, sig: 2); // SIGINT
Aspire.Hosting.Azure (2)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (2)
95processSpec.OnStart?.Invoke(process.Id); 152sys_kill(_process.Id, sig: 2); // SIGINT
ClientSample (1)
Program.cs (1)
17Console.WriteLine($"Ready for debugger to attach. Process ID: {Process.GetCurrentProcess().Id}");
csc (3)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\CSharp\csc\Program.cs (1)
31using var logger = new CompilerServerLogger($"csc {Process.GetCurrentProcess().Id}");
src\Compilers\Shared\BuildServerConnection.cs (1)
522processId = process.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}";
ExceptionHandlerSample (1)
StartupWithWebSocket.cs (1)
38await context.Response.WriteAsync($"Not a web socket request. PID: {Process.GetCurrentProcess().Id}");
GetDocument.Insider (1)
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
26Console.WriteLine($"Process ID: {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)
62Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 78Console.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)
68Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 83Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);
NavigateToBenchmarks.cs (2)
65Console.WriteLine("Found Roslyn.sln: " + Process.GetCurrentProcess().Id); 80Console.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.NewShim.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)
100SendSIGINT(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)
223Logger.LogInformation("iisexpress Process {pid} shut down", process.Id); 231Logger.LogInformation("iisexpress Process {pid} started", process.Id); 235Logger.LogError("Host process {processName} {pid} exited with code {exitCode} or failed to start.", startInfo.FileName, process.Id, process.ExitCode); 245Logger.LogInformation("iisexpress Process {pid} failed to bind to port {port}, trying again", process.Id, port); 262Logger.LogInformation("Started iisexpress successfully. Process Id : {processId}, Port: {port}", _hostProcess.Id, port); 442throw new Exception($"iisexpress Process {_hostProcess.Id} failed to shutdown"); 558SendStopMessageToProcess(hostProcess.Id); 561throw new InvalidOperationException($"iisexpress Process {hostProcess.Id} failed to gracefully shutdown."); 571throw 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 (41)
BackEnd\BuildManager\BuildManager.cs (1)
762Console.WriteLine($"Waiting for debugger to attach ({currentProcess.MainModule!.FileName} PID {currentProcess.Id}). Press enter to continue...");
BackEnd\Client\MSBuildClient.cs (1)
478CommunicationsUtilities.Trace("Server started with PID: {0}", msbuildProcess?.Id);
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
1429using (StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, @"EngineTrace_{0}.txt"), Process.GetCurrentProcess().Id), append: true))
BackEnd\Components\Communications\NodeLauncher.cs (1)
134CommunicationsUtilities.Trace("Successfully launched {1} node with PID {0}", process.Id, exeName);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (24)
164Stream nodeStream = TryConnectToProcess(nodeProcess.Id, timeout, NodeProviderOutOfProc.GetHandshake(nodeReuse, false)); 169nodeStream = TryConnectToProcess(nodeProcess.Id, timeout, NodeProviderOutOfProc.GetHandshake(nodeReuse, true)); 175CommunicationsUtilities.Trace("Shutting down node with pid = {0}", nodeProcess.Id); 267CommunicationsUtilities.Trace("Trying to connect to existing process {2} with id {1} to establish node {0}...", nodeId, nodeToReuse.Id, nodeToReuse.ProcessName); 268if (nodeToReuse.Id == Process.GetCurrentProcess().Id) 274string nodeLookupKey = GetProcessesToIgnoreKey(hostHandshake, nodeToReuse.Id); 284Stream nodeStream = TryConnectToProcess(nodeToReuse.Id, 0 /* poll, don't wait for connections */, hostHandshake); 288CommunicationsUtilities.Trace("Successfully connected to existed node {0} which is PID {1}", nodeId, nodeToReuse.Id); 289string msg = ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("NodeReused", nodeId, nodeToReuse.Id); 337_processesToIgnore.TryAdd(GetProcessesToIgnoreKey(hostHandshake, msbuildProcess.Id), default); 344Stream nodeStream = TryConnectToProcess(msbuildProcess.Id, TimeoutForNewNodeCreation, hostHandshake); 348CommunicationsUtilities.Trace("Successfully connected to created node {0} which is PID {1}", nodeId, msbuildProcess.Id); 360CommunicationsUtilities.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); 366CommunicationsUtilities.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); 372CommunicationsUtilities.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); 405Array.Sort(processes, (left, right) => left.Id.CompareTo(right.Id)); 839CommunicationsUtilities.Trace("Waiting for node with pid = {0} to exit", _process.Id); 866_process.Id); 867CommunicationsUtilities.Trace("Killing node with pid = {0}", _process.Id); 893CommunicationsUtilities.Trace(_nodeId, "COMMUNICATIONS ERROR (HRC) Node: {0} Process: {1} Bytes Read: {2} Expected: {3}", _nodeId, _process.Id, bytesRead, _headerByte.Length); 898CommunicationsUtilities.Trace(_nodeId, " Child Process {0} has exited.", _process.Id); 902CommunicationsUtilities.Trace(_nodeId, " Child Process {0} is still running.", _process.Id);
BackEnd\Components\Scheduler\Scheduler.cs (4)
2572using StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerTrace_{0}.txt"), Process.GetCurrentProcess().Id), append: true); 2596using StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true); 2710using StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true); 2750using StreamWriter file = FileUtilities.OpenWrite(String.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), Process.GetCurrentProcess().Id), append: true);
CommunicationsUtilities.cs (1)
839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
DebugUtils.cs (1)
101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
Evaluation\ProjectRootElementCache.cs (1)
677Trace.WriteLine(prefix + " " + Process.GetCurrentProcess().Id + " | " + message + param1);
ExceptionHandling.cs (1)
355var 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.");
Logging\BinaryLogger\BinaryLogger.cs (1)
511=> System.Diagnostics.Process.GetCurrentProcess().Id;
NamedPipeUtil.cs (1)
15processId = Process.GetCurrentProcess().Id;
ProcessExtensions.cs (1)
22NativeMethodsShared.KillTree(process.Id);
Microsoft.Build.CommandLine.UnitTests (1)
MSBuildServer_Tests.cs (1)
55Pid = Process.GetCurrentProcess().Id;
Microsoft.Build.Engine.OM.UnitTests (4)
DebugUtils.cs (1)
101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
355var 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.");
Microsoft.Build.Engine.UnitTests (6)
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\SdkResultOutOfProc_Tests.cs (1)
192processId.ShouldNotBe(Process.GetCurrentProcess().Id);
BackEnd\TaskHostFactory_Tests.cs (1)
50Process.GetCurrentProcess().Id.ShouldNotBe<int>(pid);
Evaluation\Expander_Tests.cs (1)
2630Assert.Equal(System.Diagnostics.Process.GetCurrentProcess().Id, pid);
Microsoft.Build.Framework (4)
NativeMethods.cs (3)
1457SafeProcessHandle childHandle = OpenProcess(eDesiredAccess.PROCESS_QUERY_INFORMATION, false, possibleChildProcess.Id); 1470int childParentProcessId = GetParentProcessId(possibleChildProcess.Id); 1476myChildren.Add(new KeyValuePair<int, SafeProcessHandle>(possibleChildProcess.Id, childHandle));
Profiler\EvaluationIdProvider.cs (1)
17private static readonly long ProcessId = Process.GetCurrentProcess().Id;
Microsoft.Build.Tasks.CodeAnalysis (3)
ManagedCompiler.cs (1)
502using var logger = new CompilerServerLogger($"MSBuild {Process.GetCurrentProcess().Id}");
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Shared\BuildServerConnection.cs (1)
522processId = process.Id;
Microsoft.Build.Tasks.Core (4)
DebugUtils.cs (1)
101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
355var 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.");
Microsoft.Build.Tasks.UnitTests (2)
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"
Microsoft.Build.UnitTests.Shared (2)
RunnerUtilities.cs (2)
153throw new TimeoutException($"Test failed due to timeout: process {p.Id} is active for more than {timeout.TotalSeconds} sec."); 161pid = p.Id;
Microsoft.Build.Utilities.Core (5)
DebugUtils.cs (1)
101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
355var 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)
22NativeMethodsShared.KillTree(process.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)
4805Assert.Equal(currentProcess.Id, int.Parse(match.Groups["pid"].Value));
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (2)
137int currentProcessId = Process.GetCurrentProcess().Id; 178newProcessId = newProcess.Id;
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
84telemetryReporter.ReportFault(eventName, description, (int)severity, forceDump, currentProcess.Id, exception);
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Services\ProcessTelemetry\RemoteProcessTelemetryService.cs (1)
116return ValueTaskFactory.FromResult(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.Workspaces.MSBuild (1)
MSBuild\BuildHostProcessManager.cs (1)
367_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.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.LanguageServices (4)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
59_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);
MSBuild (11)
CommunicationsUtilities.cs (1)
839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
DebugUtils.cs (1)
101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ExceptionHandling.cs (1)
355var 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 (3)
464if ((int)counter.RawValue == currentProcess.Id) 631Console.WriteLine($"Waiting for debugger to attach ({currentProcess.MainModule.FileName} PID {currentProcess.Id}). Press enter to continue..."); 2531Console.WriteLine($"Waiting for debugger to attach... ({currentProcess.MainModule.FileName} PID {currentProcess.Id})");
MSBuildTaskHost (10)
CommunicationsUtilities.cs (1)
839String.Format(CultureInfo.CurrentCulture, Path.Combine(s_debugDumpPath, fileName), Process.GetCurrentProcess().Id, nodeId), append: true))
ExceptionHandling.cs (1)
355var 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 (3)
1457SafeProcessHandle childHandle = OpenProcess(eDesiredAccess.PROCESS_QUERY_INFORMATION, false, possibleChildProcess.Id); 1470int childParentProcessId = GetParentProcessId(possibleChildProcess.Id); 1476myChildren.Add(new KeyValuePair<int, SafeProcessHandle>(possibleChildProcess.Id, childHandle));
OutOfProcTaskHost.cs (1)
94Console.WriteLine($"Waiting for debugger to attach ({currentProcess.MainModule.FileName} PID {currentProcess.Id}). Press enter to continue...");
OutOfProcTaskHostNode.cs (1)
814? File.CreateText(string.Format(CultureInfo.CurrentCulture, Path.Combine(FileUtilities.TempFileDirectory, @"MSBuild_NodeShutdown_{0}.txt"), Process.GetCurrentProcess().Id))
Replay (2)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Shared\BuildServerConnection.cs (1)
522processId = process.Id;
RunTests (7)
ProcessRunner.cs (1)
37public int Id => Process.Id;
ProcessUtil.cs (2)
28ManagementObject mo = new ManagementObject("win32_process.handle='" + p.Id + "'"); 54if (parentId == parentProcess.Id)
Program.cs (4)
172Logger.Log($"### Begin {process.Id}"); 185Logger.Log($"### End {process.Id}"); 228ConsoleUtil.Write($"Dumping {name} {targetProcess.Id} to {dumpFilePath} ... "); 231var 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)
311return Id == possibleChildProcess.ParentProcessId; 323return 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)
510_CSRSSProcessId = (uint)localByName[0].Id;
vbc (3)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Shared\BuildServerConnection.cs (1)
522processId = process.Id;
src\Compilers\VisualBasic\vbc\Program.cs (1)
33using var logger = new CompilerServerLogger($"vbc {Process.GetCurrentProcess().Id}");
VBCSCompiler (3)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (1)
125var processId = Process.GetCurrentProcess().Id;
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
70new ShutdownBuildResponse(Process.GetCurrentProcess().Id),
src\Compilers\Shared\BuildServerConnection.cs (1)
522processId = process.Id;