XProcess 1.4.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
dotnet add package XProcess --version 1.4.0
NuGet\Install-Package XProcess -Version 1.4.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XProcess" Version="1.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XProcess --version 1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: XProcess, 1.4.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XProcess as a Cake Addin #addin nuget:?package=XProcess&version=1.4.0 // Install XProcess as a Cake Tool #tool nuget:?package=XProcess&version=1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
XProcess

This is a .NET library that allows you to invoke an external process and expose its output as an async stream in C# 8.0.
Usage examples
Launch a process, wait for it to exit, and refer to the exit code.
using Toolbelt.Diagnostics;
...
using var process = await XProcess.Start("foo.exe").WaitForExitAsync();
if (process.ExitCode != 0) throw new Exception(process.Output);
Launch a process and get console outputs as an async stream.
using Toolbelt.Diagnostics;
...
using var process = XProcess.Start("foo.exe");
await foreach(string output in process.GetOutputAsyncStream())
{
// do something.
}
// When reaching here, it means the process was exited.
Launch a process and wait for a specific output within a particular time.
using Toolbelt.Diagnostics;
...
using var process = XProcess.Start("foo.exe");
var found = await process.WaitForOutputAsync(str => str.Contains("Now listening on:"), option => {
option.IdleTimeout = 1000;
option.ProcessTimeout = 5000;
});
// When the "found" is false, it means the process
// has not outputted "Now listening on:" in 5 seconds
// or has not output any response over 1 second.
Launch a process with specific environment variables.
using Toolbelt.Diagnostics;
...
await XProcess.Start("foo.exe", options => {
options.EnvironmentVariables["FOO"] = "BAR";
}).WaitForExitAsync();
Release Notes
Release notes are here.
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- System.Threading.Channels (>= 4.7.1)
-
net6.0
- System.Threading.Channels (>= 4.7.1)
-
net7.0
- System.Threading.Channels (>= 4.7.1)
-
net8.0
- System.Threading.Channels (>= 4.7.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (6)
Showing the top 5 popular GitHub repositories that depend on XProcess:
Repository | Stars |
---|---|
jsakamoto/BlazorWasmPreRendering.Build
When you publish your Blazor Wasm app, this package pre-renders and saves the app as static HTML files in your public folder.
|
|
jsakamoto/Toolbelt.Blazor.I18nText
The class library that provides the ability to localize texts on your Blazor app!
|
|
jsakamoto/Toolbelt.Blazor.HeadElement
Head element support (change the document title, "meta" elements such as OGP, and "link" elements) for Blazor apps.
|
|
jsakamoto/nupkg-selenium-webdriver-chromedriver
The NuGet package include Selenium Google Chrome Driver files for Win32, macOS, and Linux.
|
|
jsakamoto/Toolbelt.Blazor.HotKeys
This is a class library that provides configuration-centric keyboard shortcuts for your Blazor WebAssembly (client-side) apps.
|
v.1.4.0
- Improved: Add new flexible wait options for the WaitForOutputAsync() method
- Improved: add a new option to apply environment variables.
To see all the change logs, please visit the following URL.
- https://github.com/jsakamoto/XProcess/blob/master/RELEASE-NOTES.txt