# RequiredCommandAnnotation

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/RequiredCommandAnnotation.cs)
- Implements: [IResourceAnnotation](/reference/api/csharp/aspire.hosting/iresourceannotation.md)

An annotation which declares that a resource requires a specific command/executable to be available on the local machine PATH before it can start.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class RequiredCommandAnnotation
    : Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
    // ...
}
```

## Constructors

- [RequiredCommandAnnotation(string)](/reference/api/csharp/aspire.hosting/requiredcommandannotation/constructors.md#constructor-string) -- An annotation which declares that a resource requires a specific command/executable to be available on the local machine PATH before it can start.

## Properties

- [Command](/reference/api/csharp/aspire.hosting/requiredcommandannotation/properties.md#command) : `string` `get` -- Gets the command string (file name or path) that should be validated.
- [HelpLink](/reference/api/csharp/aspire.hosting/requiredcommandannotation/properties.md#helplink) : `string?` `get; init` -- Gets or sets an optional help link URL to guide users when the command is missing.
- [ValidationCallback](/reference/api/csharp/aspire.hosting/requiredcommandannotation/properties.md#validationcallback) : `Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>>` `get; init` -- Gets or sets an optional custom validation callback that will be invoked after the command has been resolved.
