Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddExecutable

Method
📦 Aspire.Hosting v17.0.0
func (DistributedApplicationBuilder) AddExecutable(
name string,
command string,
workingDirectory string,
args []string,
) ExecutableResource

Signature

methodAddExecutablebuilder
Adds an executable resource to the application model.
AddExecutable(
name string,
command string,
workingDirectory string,
args []string,
) ExecutableResource
namestringThe name of the resource.
commandstringThe executable path. This can be a fully qualified path or a executable to run from the shell/command line.
workingDirectorystringThe working directory of the executable.
args[]stringThe arguments to the executable.
ExecutableResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: