Skip to content
Docs Try Aspire

RequiredCommandResourceExtensions

Class static net8.0
📦 Aspire.Hosting v13.2.0
Provides extension methods for adding required command annotations to resources.
namespace Aspire.Hosting;
public static class RequiredCommandResourceExtensions
{
// ...
}
WithRequiredCommand(IResourceBuilder<T>, string, string?)extensionats export
Declares that a resource requires a specific command/executable to be available on the local machine PATH before it can start.
WithRequiredCommand(IResourceBuilder<T>, string, Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>>, string?)extensionexperimentalats ignored
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.
View all methods