439 instantiations of ProcessStartInfo
AnalyzeCiFailure (2)
AnalyzeCiFailure.Tests (1)
aspire (40)
aspire-managed (2)
aspire-tray (5)
Aspire.Acquisition.Tests (3)
Aspire.Cli.EndToEnd.Tests (7)
Aspire.Cli.Tests (52)
Utils\ProcessCaptureRunnerTests.cs (6)
20? new ProcessStartInfo("cmd.exe", ["/d", "/c", "exit 0"])
21: new ProcessStartInfo("/bin/sh", ["-c", "exit 0"]);
59? new ProcessStartInfo("cmd.exe", ["/d", "/c", "exit 0"])
60: new ProcessStartInfo("/bin/sh", ["-c", "exit 0"]);
112? new ProcessStartInfo("cmd.exe", ["/d", "/c", "exit 0"])
113: new ProcessStartInfo("/bin/sh", ["-c", "exit 0"]);
Aspire.Dashboard (6)
Aspire.Dashboard.Playwright.Tests (1)
Aspire.Deployment.EndToEnd.Tests (57)
Aspire.EndToEnd.Tests (2)
Aspire.Hosting (4)
Aspire.Hosting.Azure.Tests (3)
Aspire.Hosting.CodeGeneration.Go (1)
Aspire.Hosting.CodeGeneration.Go.Tests (9)
Aspire.Hosting.CodeGeneration.Java.Tests (1)
Aspire.Hosting.CodeGeneration.Python (1)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.Dotnet (1)
Aspire.Hosting.EntityFrameworkCore (1)
Aspire.Hosting.Foundry (1)
Aspire.Hosting.Java.Tests (4)
Aspire.Hosting.JavaScript.Tests (4)
Aspire.Hosting.Maui (2)
Aspire.Hosting.Native.Client (1)
Aspire.Hosting.Native.Core.Tests (10)
Aspire.Hosting.Native.Server (1)
Aspire.Hosting.Python (1)
Aspire.Hosting.Python.Tests (2)
Aspire.Hosting.Radius (6)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.RemoteHost (3)
Aspire.Hosting.RemoteHost.Tests (7)
Aspire.Hosting.Rust (1)
Aspire.Hosting.Rust.Tests (1)
Aspire.Hosting.Sdk.Tests (2)
Aspire.Hosting.Tasks (2)
Aspire.Hosting.Tests (6)
Aspire.Managed.Tests (1)
Aspire.Playground.Tests (1)
Aspire.Templates.Tests (2)
Aspire.TestTools (4)
Aspire.TestUtilities (1)
Aspire.Tray.Tests (11)
CreateLayout (1)
csc (1)
dotnet-aot (2)
dotnet-dev-certs (12)
dotnet-format (1)
dotnet-getdocument (1)
dotnet-openapi (1)
dotnet-suggest (1)
dotnet-user-jwts (2)
dotnet-user-secrets (2)
GenerateTemplateManifest (1)
Infrastructure.Common (1)
Infrastructure.Tests (20)
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
Microsoft.Arcade.Common (1)
Microsoft.AspNetCore.Components.Testing (1)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (12)
Microsoft.AspNetCore.Server.IntegrationTesting (7)
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Microsoft.AspNetCore.SpaProxy (3)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.Build (3)
Microsoft.Build.Framework (2)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.Core (1)
Microsoft.CodeAnalysis.BuildClient.Package (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
Microsoft.DotNet.Cli.InternalMicrosoft (1)
Microsoft.DotNet.Cli.Utils (2)
Microsoft.DotNet.MacOsPkg.Core (1)
Microsoft.DotNet.StrongName (2)
Microsoft.Extensions.AI.Evaluation.Console (1)
Microsoft.Extensions.AI.Templates.Tests (1)
Microsoft.Extensions.DataIngestion.MarkItDown (1)
Microsoft.Extensions.DataIngestion.Tests (1)
Microsoft.Extensions.Http.Resilience.Tests (1)
Microsoft.NET.Build.Containers (7)
Microsoft.NET.HostModel (1)
Microsoft.NET.ProjectData (1)
Microsoft.NET.Sdk.Publish.Tasks (1)
Microsoft.NET.Sdk.Razor.Tasks (1)
Microsoft.TemplateEngine.Cli (2)
Microsoft.TestPlatform.Build (1)
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (1)
NativeIntegrations.DockerCompose (1)
NuGet.Build.Tasks (1)
NuGet.CommandLine.XPlat (1)
NuGet.Common (1)
NuGet.Credentials (1)
NuGet.Protocol (2)
Pipelines.AppHost (4)
Pipelines.Library (1)
RepoTasks (12)
rzc (1)
SelectTests (2)
SuperFileCheck (1)
System.CodeDom (1)
System.Diagnostics.PerformanceCounter (1)
System.Diagnostics.Process (6)
System.Net.Ping (1)
System.Windows.Forms (1)
vbc (1)
VBCSCompiler (1)
689 references to ProcessStartInfo
AnalyzeCiFailure.Tests (3)
aspire (101)
DotNet\ProcessExecutionFactory.cs (6)
71var startInfo = CreateProcessStartInfo(fileName, args, workingDirectory.FullName, options);
88public IProcessExecution CreateExecution(ProcessStartInfo startInfo, ProcessInvocationOptions options)
99var childStartInfo = CreateProcessStartInfo(startInfo.FileName, startInfo.ArgumentList, startInfo.WorkingDirectory, options);
128/// Maps the launch options onto a <see cref="ProcessStartInfo"/>. Standard handles are assigned by
131internal static ProcessStartInfo CreateProcessStartInfo(string fileName, IEnumerable<string> arguments, string workingDirectory, ProcessInvocationOptions options)
133var startInfo = new ProcessStartInfo(fileName, arguments)
Git\GitCommandRunner.cs (14)
44var startInfo = CreateStartInfo(workingDirectory.FullName, arguments, mode);
58internal ProcessStartInfo CreateStartInfo(string directory, string[] arguments, GitCommandMode mode)
67var startInfo = new ProcessStartInfo("git", unattended
107private ProcessStartInfo CreateUnattendedQuery(ProcessStartInfo source, string[] arguments)
109var query = CreateStartInfo(source.WorkingDirectory, arguments, GitCommandMode.Unattended);
120internal async Task ConfigureUnattendedSshAsync(ProcessStartInfo startInfo, string[] arguments, CancellationToken cancellationToken)
131var urlQuery = CreateUnattendedQuery(startInfo,
142var configQuery = CreateUnattendedQuery(startInfo,
210private async Task<string?> GetOpenSshExecutableAsync(ProcessStartInfo gitStartInfo, string executable, CancellationToken cancellationToken)
238var pathQuery = CreateUnattendedQuery(gitStartInfo,
278var probe = CreateUnattendedQuery(gitStartInfo, ["version"]);
286internal async Task<bool> VerifyOpenSshAsync(ProcessStartInfo probe, CancellationToken cancellationToken)
351internal async Task<string> RunProcessAsync(ProcessStartInfo startInfo, bool captureCancellationOutput, GitCommandMode mode, CancellationToken cancellationToken)
Git\GitRepository.cs (4)
27var startInfo = CreateGitStartInfo(executionContext.WorkingDirectory, ["rev-parse", "--show-toplevel"]);
84var startInfo = CreateGitStartInfo(searchRoot, ["ls-files", "--cached", "--others", "--exclude-standard", "-z"]);
128private static ProcessStartInfo CreateGitStartInfo(DirectoryInfo workingDirectory, string[] arguments) =>
137private async Task<ProcessTextOutput> RunGitAsync(ProcessStartInfo startInfo, ProfilingTelemetry.ActivityScope activity, CancellationToken cancellationToken)
src\Shared\Telemetry\InternalMicrosoftDetector.cs (4)
54private readonly Func<ProcessStartInfo, Action<string>, Action<string>, IChildProcess> _createProcess;
67Func<ProcessStartInfo, Action<string>, Action<string>, IChildProcess> createProcess, bool isCIEnvironment)
89Func<ProcessStartInfo, Action<string>, Action<string>, IChildProcess> createProcess,
1138var startInfo = new ProcessStartInfo
aspire-managed (6)
aspire-tray (21)
Aspire.Acquisition.Tests (7)
Aspire.Cli.EndToEnd.Tests (7)
Aspire.Cli.Tests (112)
Configuration\ConfigSourceServiceGitTests.cs (5)
198var startInfo = new ProcessStartInfo
294var startInfo = client.CreateStartInfo(workspace.Path, ["fetch"], GitCommandMode.Unattended);
319var startInfo = client.CreateStartInfo(workspace.Path, ["fetch", "--depth", "1", "--", "https://example.com/configuration", "HEAD"], GitCommandMode.Interactive);
344var startInfo = runner.CreateStartInfo(workspace.Path, ["ls-remote", "--", "repository", "HEAD"], GitCommandMode.Interactive);
363var startInfo = client.CreateStartInfo(workspace.Path, [command], GitCommandMode.Interactive);
Git\GitCommandRunnerTests.Authentication.cs (14)
26var info = runner.CreateStartInfo(Environment.CurrentDirectory, ["ls-remote", "--", "repository"], Enum.Parse<GitCommandMode>(mode));
66var info = runner.CreateStartInfo(workspace.Path, ["ls-remote", "--", server.Repository], mode);
112var info = runner.CreateStartInfo(workspace.Path, ["ls-remote", "--", server.Repository], GitCommandMode.Unattended);
181var info = runner.CreateStartInfo(workspace.Path, arguments, GitCommandMode.Unattended);
218var info = runner.CreateStartInfo(workspace.Path, arguments, GitCommandMode.Unattended);
238var probe = CreateShellStartInfo(
252var probe = CreateShellStartInfo(
263var probe = CreateShellStartInfo("sleep 60", "Start-Sleep -Seconds 60");
285var info = runner.CreateStartInfo(directory.FullName, arguments, GitCommandMode.Unattended);
308var info = runner.CreateStartInfo(workspace.Path, arguments, GitCommandMode.Unattended);
335var info = runner.CreateStartInfo(workspace.Path, arguments, GitCommandMode.Unattended);
386private async Task<string> GetGitSelectedSshAsync(ProcessStartInfo source)
393var query = CreateRunner().CreateStartInfo(source.WorkingDirectory,
405private static void IsolateGit(ProcessStartInfo info, string home, string config)
Git\GitCommandRunnerTests.cs (16)
31var startInfo = runner.CreateStartInfo(Environment.CurrentDirectory,
142var startInfo = CreateShellStartInfo($"printf '%s' '{message}' >&2; exit 128",
178var startInfo = new ProcessStartInfo(Path.Combine(workspace.Path, "missing-private-executable"))
196var startInfo = new ProcessStartInfo("missing-executable");
207var startInfo = CreateShellStartInfo("printf 'first\\r\\nsecond\\000last'", "[Console]::Out.Write(\"first`r`nsecond`0last\")");
222var startInfo = CreateShellStartInfo(
249var startInfo = CreateShellStartInfo(
282var startInfo = runner.CreateStartInfo(Environment.CurrentDirectory, [command], GitCommandMode.Interactive);
283var shell = CreateShellStartInfo(
320var startInfo = CreateShellStartInfo(
349var startInfo = CreateShellStartInfo("printf 'refs\\000blob'; printf 'Git warning' >&2",
375var startInfo = CreateShellStartInfo(
405var startInfo = runner.CreateStartInfo(workspace.Path, ["fetch"], GitCommandMode.Captured);
406var shell = CreateShellStartInfo(
432private static ProcessStartInfo CreateShellStartInfo(string unixCommand, string windowsCommand)
434var startInfo = new ProcessStartInfo(OperatingSystem.IsWindows() ? "powershell.exe" : "/bin/sh")
Npm\NpmRunnerTests.cs (8)
35var startInfo = NpmRunner.CreateNpmProcessStartInfo("/usr/bin/npm", ["view", "express", "version"], "/tmp/workdir", new TestEnvironment(), stdin);
53var startInfo = NpmRunner.CreateNpmProcessStartInfo(
74var startInfo = NpmRunner.CreateNpmProcessStartInfo(
91var startInfo = NpmRunner.CreateNpmProcessStartInfo(
107var startInfo = NpmRunner.CreateNpmProcessStartInfo(
124var startInfo = NpmRunner.CreateNpmProcessStartInfo(
140var startInfo = NpmRunner.CreateNpmProcessStartInfo("/usr/bin/npm", [], "/tmp", new TestEnvironment(), stdin);
152var startInfo = NpmRunner.CreateNpmProcessStartInfo(@"C:\Program Files\nodejs\npm.cmd", [], @"C:\temp", new TestEnvironment(), stdin);
Aspire.Dashboard (18)
src\Shared\Telemetry\InternalMicrosoftDetector.cs (4)
54private readonly Func<ProcessStartInfo, Action<string>, Action<string>, IChildProcess> _createProcess;
67Func<ProcessStartInfo, Action<string>, Action<string>, IChildProcess> createProcess, bool isCIEnvironment)
89Func<ProcessStartInfo, Action<string>, Action<string>, IChildProcess> createProcess,
1138var startInfo = new ProcessStartInfo
Aspire.Dashboard.Playwright.Tests (1)
Aspire.Dashboard.Tests (4)
Aspire.Deployment.EndToEnd.Tests (1)
Aspire.EndToEnd.Tests (6)
Aspire.Hosting (4)
Aspire.Hosting.Azure.Tests (1)
Aspire.Hosting.CodeGeneration.Go.Tests (3)
Aspire.Hosting.CodeGeneration.Java.Tests (1)
Aspire.Hosting.CodeGeneration.Python (1)
Aspire.Hosting.DevTunnels (2)
Aspire.Hosting.Dotnet (1)
Aspire.Hosting.EntityFrameworkCore (1)
Aspire.Hosting.Foundry (3)
Aspire.Hosting.JavaScript.Tests (3)
Aspire.Hosting.Maui (2)
Aspire.Hosting.Native.Client (1)
Aspire.Hosting.Native.Core.Tests (13)
Aspire.Hosting.Native.Server (1)
Aspire.Hosting.Python (1)
Aspire.Hosting.Python.Tests (2)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.RemoteHost (18)
Aspire.Hosting.RemoteHost.Tests (19)
Aspire.Hosting.Rust (1)
Aspire.Hosting.Rust.Tests (1)
Aspire.Hosting.Sdk.Tests (1)
Aspire.Hosting.Tasks (5)
Aspire.Hosting.Tests (1)
Aspire.Managed.Tests (6)
Aspire.Playground.Tests (1)
Aspire.Templates.Tests (6)
Aspire.TestTools (2)
Aspire.TestUtilities (1)
Aspire.Tray.Tests (39)
CreateLayout (1)
csc (1)
dotnet-aot (6)
dotnet-dev-certs (10)
dotnet-format (5)
dotnet-getdocument (1)
dotnet-openapi (1)
dotnet-suggest (1)
dotnet-user-jwts (3)
dotnet-user-secrets (3)
GenerateTemplateManifest (1)
Infrastructure.Common (1)
Infrastructure.Tests (24)
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
Microsoft.Arcade.Common (4)
Microsoft.AspNetCore.Components.Testing (4)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (10)
Microsoft.AspNetCore.Server.IntegrationTesting (9)
Microsoft.AspNetCore.Server.Kestrel.Core (10)
Microsoft.AspNetCore.SpaProxy (3)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.Build (3)
Microsoft.Build.Framework (5)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.Core (1)
Microsoft.Build.Utilities.Core (2)
Microsoft.CodeAnalysis.BuildClient.Package (1)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild (10)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.Cli.Utils (11)
Microsoft.DotNet.MacOsPkg.Core (2)
Microsoft.Extensions.AI.Templates.Tests (1)
Microsoft.Extensions.DataIngestion.MarkItDown (1)
Microsoft.Extensions.DataIngestion.Tests (1)
Microsoft.Extensions.Http.Resilience.Tests (1)
Microsoft.NET.Build.Containers (6)
Microsoft.NET.HostModel (1)
Microsoft.NET.Sdk.Publish.Tasks (1)
Microsoft.NET.Sdk.Razor.Tasks (1)
Microsoft.TestPlatform.Build (1)
Microsoft.TestPlatform.PlatformAbstractions (1)
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (1)
netstandard (1)
NuGet.CommandLine.XPlat (1)
NuGet.Common (1)
NuGet.Credentials (2)
NuGet.Protocol (3)
RepoTasks (10)
rzc (1)
sdk-tasks (2)
SelectTests (2)
SuperFileCheck (1)
System (1)
System.CodeDom (1)
System.Diagnostics.PerformanceCounter (1)
System.Diagnostics.Process (73)
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (6)
202private delegate SafeProcessHandle StartWithShellExecuteDelegate(ProcessStartInfo startInfo, SafeFileHandle? stdinHandle, SafeFileHandle? stdoutHandle, SafeFileHandle? stderrHandle, out ProcessWaitState.Holder? waitStateHolder);
205private static SafeProcessHandle StartCore(ProcessStartInfo startInfo, SafeFileHandle? stdinHandle, SafeFileHandle? stdoutHandle, SafeFileHandle? stderrHandle, SafeHandle[]? inheritedHandlesSnapshot = null)
208internal static SafeProcessHandle StartCore(ProcessStartInfo startInfo, SafeFileHandle? stdinHandle, SafeFileHandle? stdoutHandle,
246internal static unsafe SafeProcessHandle StartWithCallback(ProcessStartInfo startInfo, SafeFileHandle? stdinFd, SafeFileHandle? stdoutHandle, SafeFileHandle? stderrHandle,
356private static SafeProcessHandle StartWithShellExecute(ProcessStartInfo startInfo, SafeFileHandle? stdinHandle, SafeFileHandle? stdoutHandle,
429ProcessStartInfo startInfo, string? resolvedFilename, string[] argv,
System\Diagnostics\Process.cs (11)
50private ProcessStartInfo? _startInfo;
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'/>.
554public ProcessStartInfo StartInfo
1272ProcessStartInfo startInfo = StartInfo;
1299ProcessStartInfo.ValidateInheritedHandles(childInputHandle, childOutputHandle, childErrorHandle, inheritedHandles);
1329ProcessStartInfo startInfo,
1407private static void CloseChildHandles(ProcessStartInfo startInfo, SafeFileHandle? childInputHandle, SafeFileHandle? childOutputHandle, SafeFileHandle? childErrorHandle)
1429private void CreateStandardStreams(ProcessStartInfo startInfo, SafeFileHandle? parentInputPipeHandle, SafeFileHandle? parentOutputPipeHandle, SafeFileHandle? parentErrorPipeHandle)
1454internal bool StartCoreWithCallback(ProcessStartInfo startInfo,
1479ProcessStartInfo.ValidateInheritedHandles(childInputHandle, childOutputHandle, childErrorHandle, inheritedHandles);
1563public static Process? Start(ProcessStartInfo startInfo)
System\Diagnostics\Process.Scenarios.cs (32)
19/// <param name="startInfo">The <see cref="ProcessStartInfo"/> that contains the information used to start the process.</param>
23/// <para>One or more of <see cref="ProcessStartInfo.RedirectStandardInput"/>,
24/// <see cref="ProcessStartInfo.RedirectStandardOutput"/>, or
25/// <see cref="ProcessStartInfo.RedirectStandardError"/> is set to <see langword="true"/>.
29/// <para><see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.
35/// When a standard handle (<see cref="ProcessStartInfo.StandardInputHandle"/>,
36/// <see cref="ProcessStartInfo.StandardOutputHandle"/>, or <see cref="ProcessStartInfo.StandardErrorHandle"/>)
48public static int StartAndForget(ProcessStartInfo startInfo)
89/// <param name="startInfo">The <see cref="ProcessStartInfo"/> that contains the information used to start the process.</param>
98/// <see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.
103public static ProcessExitStatus Run(ProcessStartInfo startInfo, TimeSpan? timeout = default)
142ProcessStartInfo startInfo = CreateStartInfo(fileName, arguments);
155/// <param name="startInfo">The <see cref="ProcessStartInfo"/> that contains the information used to start the process.</param>
163/// <see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.
168public static async Task<ProcessExitStatus> RunAsync(ProcessStartInfo startInfo, CancellationToken cancellationToken = default)
204ProcessStartInfo startInfo = CreateStartInfo(fileName, arguments);
218/// <param name="startInfo">The <see cref="ProcessStartInfo"/> that contains the information used to start the process.</param>
227/// <para><see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.</para>
229/// <para><see cref="ProcessStartInfo.RedirectStandardOutput"/> or <see cref="ProcessStartInfo.RedirectStandardError"/> is not set to <see langword="true"/>.</para>
234public static ProcessTextOutput RunAndCaptureText(ProcessStartInfo startInfo, TimeSpan? timeout = default)
299/// <param name="startInfo">The <see cref="ProcessStartInfo"/> that contains the information used to start the process.</param>
307/// <para><see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.</para>
309/// <para><see cref="ProcessStartInfo.RedirectStandardOutput"/> or <see cref="ProcessStartInfo.RedirectStandardError"/> is not set to <see langword="true"/>.</para>
314public static async Task<ProcessTextOutput> RunAndCaptureTextAsync(ProcessStartInfo startInfo, CancellationToken cancellationToken = default)
361private static ProcessStartInfo CreateStartInfo(string fileName, IEnumerable<string>? arguments)
368private static ProcessStartInfo CreateStartInfoForCapture(string fileName, IEnumerable<string>? arguments)
370ProcessStartInfo startInfo = CreateStartInfo(fileName, arguments);
377private static void ThrowIfUseShellExecute(ProcessStartInfo startInfo, string methodName)
385private static void ThrowIfNotRedirected(ProcessStartInfo startInfo, string methodName)
System\Runtime\InteropServices\UnixProcessStartArguments.cs (5)
11/// This ref struct is populated by the <see cref="Start(ProcessStartInfo, Func{UnixProcessStartArguments, int})"/> method.
15internal unsafe UnixProcessStartArguments(byte* resolvedPath, byte** arguments, byte** environmentVariables, nint standardInput, nint standardOutput, nint standardError, ProcessStartInfo processStartInfo)
78public ProcessStartInfo ProcessStartInfo { get; }
96/// <exception cref="InvalidOperationException"><see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.</exception>
101public static Process Start(ProcessStartInfo startInfo, Func<UnixProcessStartArguments, int> callback)
System.Net.Ping (1)
System.Windows.Forms (1)
vbc (1)
VBCSCompiler (1)