You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<value>UseShellExecute is not supported by Process.{0}. On Windows, shell execution may not create a new process, which would make it impossible to return a valid process ID.</value>
Copy file name to clipboardExpand all lines: src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Scenarios.cs
+27-10Lines changed: 27 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -197,7 +197,9 @@ public static Task<ProcessExitStatus> RunAsync(string fileName, IList<string>? a
197
197
/// <returns>The captured text output and exit status of the process.</returns>
198
198
/// <exception cref="ArgumentNullException"><paramref name="startInfo"/> is <see langword="null"/>.</exception>
199
199
/// <exception cref="InvalidOperationException">
200
-
/// <see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.
200
+
/// <para><see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.</para>
201
+
/// <para>-or-</para>
202
+
/// <para><see cref="ProcessStartInfo.RedirectStandardOutput"/> or <see cref="ProcessStartInfo.RedirectStandardError"/> is not set to <see langword="true"/>.</para>
201
203
/// </exception>
202
204
[UnsupportedOSPlatform("ios")]
203
205
[UnsupportedOSPlatform("tvos")]
@@ -207,9 +209,7 @@ public static ProcessTextOutput RunAndCaptureText(ProcessStartInfo startInfo, Ti
/// Asynchronously starts the process described by <paramref name="startInfo"/>, captures its standard output and error,
@@ -277,7 +277,9 @@ public static ProcessTextOutput RunAndCaptureText(string fileName, IList<string>
277
277
/// <returns>A task that represents the asynchronous operation. The value of the task contains the captured text output and exit status of the process.</returns>
278
278
/// <exception cref="ArgumentNullException"><paramref name="startInfo"/> is <see langword="null"/>.</exception>
279
279
/// <exception cref="InvalidOperationException">
280
-
/// <see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.
280
+
/// <para><see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.</para>
281
+
/// <para>-or-</para>
282
+
/// <para><see cref="ProcessStartInfo.RedirectStandardOutput"/> or <see cref="ProcessStartInfo.RedirectStandardError"/> is not set to <see langword="true"/>.</para>
281
283
/// </exception>
282
284
[UnsupportedOSPlatform("ios")]
283
285
[UnsupportedOSPlatform("tvos")]
@@ -287,9 +289,7 @@ public static async Task<ProcessTextOutput> RunAndCaptureTextAsync(ProcessStartI
0 commit comments