# IContainerRuntimeResolver

- Kind: `interface`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Publishing`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/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.
