# IContainerRuntimeResolver

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

Resolves the configured or auto-detected container runtime asynchronously. The result is cached after the first resolution.

## Definition

```csharp
namespace Aspire.Hosting.Publishing;

public interface IContainerRuntimeResolver
{
    // ...
}
```

## Methods

- [ResolveAsync(CancellationToken)](/reference/api/csharp/aspire.hosting/icontainerruntimeresolver/methods.md#resolveasync-cancellationtoken) : [Task<IContainerRuntime>](/reference/api/csharp/aspire.hosting/icontainerruntime.md) `abstract` -- Resolves the container runtime, detecting it from the environment if not explicitly configured. The result is cached after the first call.
