Exec 0.9.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Exec --version 0.9.2
                    
NuGet\Install-Package Exec -Version 0.9.2
                    
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="Exec" Version="0.9.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Exec" Version="0.9.2" />
                    
Directory.Packages.props
<PackageReference Include="Exec" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Exec --version 0.9.2
                    
#r "nuget: Exec, 0.9.2"
                    
#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.
#:package Exec@0.9.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Exec&version=0.9.2
                    
Install as a Cake Addin
#tool nuget:?package=Exec&version=0.9.2
                    
Install as a Cake Tool

A dotnet library to fire subprocess command call.

Usage

Install from NuGet

dotnet add package Exec

This library supports .NET 5 and version onwards.

Basic usage

var output = await Exec.RunAsync("echo hello");
Assert.Contains("hello", output);

That's all.

Application just call the static methods of Exec class, along with below APIs.

Task<string> RunAsync(string command, CancellationToken cancellationToken = default)

Task<string> RunAsync(string command, ExecOption option, CancellationToken cancellationToken = default)

The ExecOption can accept customized parameters in case of the default behavior not meet your requirements.

Property Comment Default
Shell The shell application used to execute command passed in. In windows default to cmd.exe, and /bin/sh for Linux and macOS.
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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 was computed.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.24.0 97 1/7/2026
2.23.0 50 1/7/2026
2.22.0 45 1/7/2026
2.21.0 45 1/7/2026
2.17.0 47 1/7/2026
2.14.0 49 1/7/2026
2.0.0 447 12/8/2025
1.3.0 164 12/4/2025
1.2.0 479 11/24/2023
1.1.0 183 10/15/2023
1.0.0 193 10/12/2023
0.9.2 150 10/12/2023
0.9.1 143 10/11/2023
0.9.0 143 10/11/2023
0.1.0-alpha 136 10/10/2023
0.0.1-alpha 122 10/10/2023