Skip to content
Docs Try Aspire

RequiredCommandAnnotation Properties

Class Properties 3 members
An annotation which declares that a resource requires a specific command/executable to be available on the local machine PATH before it can start.
Gets the command string (file name or path) that should be validated.
public string Command { get; }
ValidationCallback Section titled ValidationCallback nullable Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>>
Gets or sets an optional custom validation callback that will be invoked after the command has been resolved.
public Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>>? ValidationCallback { get; init; }
The callback receives a RequiredCommandValidationContext containing the resolved path and service provider. It should return a RequiredCommandValidationResult indicating whether the command is valid.