AutomationIoC.CommandLine
3.0.0-alpha1
.NET 8.0
This package targets .NET 8.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.
This is a prerelease version of AutomationIoC.CommandLine.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package AutomationIoC.CommandLine --version 3.0.0-alpha1
NuGet\Install-Package AutomationIoC.CommandLine -Version 3.0.0-alpha1
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="AutomationIoC.CommandLine" Version="3.0.0-alpha1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AutomationIoC.CommandLine" Version="3.0.0-alpha1" />
<PackageReference Include="AutomationIoC.CommandLine" />
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 AutomationIoC.CommandLine --version 3.0.0-alpha1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AutomationIoC.CommandLine, 3.0.0-alpha1"
#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 AutomationIoC.CommandLine@3.0.0-alpha1
#: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=AutomationIoC.CommandLine&version=3.0.0-alpha1&prerelease
#tool nuget:?package=AutomationIoC.CommandLine&version=3.0.0-alpha1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AutomationIoC.Runtime
Dependency Injection Framework for C# Console Applications
NuGet Packages
Package | Description |
---|---|
AutomationIoC.CommandLine | Dependency Injection Framework for C# Console Applications |
Documentation
Please visit the AutomationIoC Documentation Site for installation, getting started, and API documentation.
Samples
Please visit and/or download our AutomationIoC.CommandLine Sample Solution to get a more in-depth view of usage.
Installation
.NET CLI
dotnet add package AutomationIoC.CommandLine
Development
Create Automation Console Command to run
public class TestCommand : StandardCommand
{
public override void ConfigureCommand(IServiceBinderFactory serviceBinderFactory, Command command)
{
var greetingOption = new Option<string>(
name: "--greeting",
description: "New greeting to display.");
command.AddOption(greetingOption);
command.SetHandler(UpdateGreeting,
greetingOption,
serviceBinderFactory.Bind<ITestService>(),
serviceBinderFactory.Bind<IConfiguration>());
}
public override void Configure(HostBuilderContext hostBuilderContext, IConfigurationBuilder configurationBuilder)
{
var appSettings = new Dictionary<string, string>()
{
["CurrentGreetingMessage"] = "Current Greeting: {0}",
["NewGreetingMessage"] = "New Greeting: {0}"
};
configurationBuilder.AddInMemoryCollection(appSettings);
}
public override void ConfigureServices(HostBuilderContext hostBuilderContext, IServiceCollection services)
{
serviceCollection.AddScoped<ITestService, TestService>();
}
private void UpdateGreeting(
string newGreeting,
ITestService testService,
IConfiguration configuration)
{
string unformattedCurrentGreeting = configuration.GetValue<string>("CurrentGreetingMessage");
string unformattedNewGreeting = configuration.GetValue<string>("NewGreetingMessage");
string currentGreeting = testService.GetGreeting();
Console.WriteLine(unformattedCurrentGreeting, currentGreeting);
string updatedGreeting = testService.UpdateGreeting(newGreeting);
Console.WriteLine(unformattedNewGreeting, updatedGreeting);
}
}
Add Automation Console Builder in startup
class Program
{
static void Main(string[] args)
{
IAutomationConsoleBuilder builder =
// Passing in "args" is optional
AutomationConsole.CreateDefaultBuilder(args)
// Add command name/path here
.AddCommand<TestCommand>("greet");
IAutomationConsole console = builder.Build();
console.Run();
}
}
Run command
dotnet run -- greet --greeting "Hello World"
Other Resources
- .NET Command-Line-Api Project
- Tutorial: Create a .NET tool using the .NET CLI
- Tutorial: Install and use a .NET global tool using the .NET CLI
- Tutorial: Install and use a .NET local tool using the .NET CLI
Related Packages
Package | Description |
---|---|
AutomationIoC.Runtime | Runtime services for AutomationIoC framework |
AutomationIoC.PowerShell | PowerShell PSCmdlet SDK utilities for Automation framework development |
AutomationIoC.PowerShell.Tools | Development tools for running/testing PSCmdlets built with Automation framework |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 is compatible. 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. |
.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
- AutomationIoC.Runtime (>= 3.0.0-alpha1)
- System.CommandLine (>= 2.0.0-beta4.22272.1)
-
net8.0
- AutomationIoC.Runtime (>= 3.0.0-alpha1)
- System.CommandLine (>= 2.0.0-beta4.22272.1)
-
net9.0
- AutomationIoC.Runtime (>= 3.0.0-alpha1)
- System.CommandLine (>= 2.0.0-beta4.22272.1)
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 |
---|---|---|
3.0.0-beta1 | 102 | 7/31/2025 |
3.0.0-alpha2 | 267 | 7/26/2025 |
3.0.0-alpha1 | 345 | 7/25/2025 |