Skip to content
DocsTry Aspire
DocsTry

withRequiredCommandValidation

Method
📦 Aspire.Hosting v13.5.0
interface ContainerResource {
// ... omitted for brevity
withRequiredCommandValidation(
command: string,
validationCallback: callback,
helpLink?: string): IResource;
}

Signature

methodwithRequiredCommandValidationbuilder
Declares that a resource requires a specific command/executable to be available on the local machine PATH before it can start, with custom validation logic.
withRequiredCommandValidation(command: string, validationCallback: (arg: RequiredCommandValidationContext) => Promise<RequiredCommandValidationResult>, helpLink?: string): IResource
commandstring
validationCallback(arg: RequiredCommandValidationContext) => Promise<RequiredCommandValidationResult>
helpLinkstringoptional
IResource

Applies to

This method applies to the following types: