Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithRequiredCommand

Method
📦 Aspire.Hosting v17.0.0
func (Resource) WithRequiredCommand(
command string,
options ...*WithRequiredCommandOptions,
) Resource

Signature

methodWithRequiredCommandbuilder
Declares that a resource requires a specific command/executable to be available on the local machine PATH before it can start.
WithRequiredCommand(
command string,
options ...*WithRequiredCommandOptions,
) Resource
commandstringThe command string (file name or path) that should be validated.
options...*WithRequiredCommandOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithRequiredCommandOptions argument.

HelpLink*stringAn optional help link URL to guide users when the command is missing.
Resource

The resource builder.

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

Applies to

This method applies to the following types: