# RegistryTargetAnnotation

- 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/RegistryTargetAnnotation.cs)
- Implements: [IResourceAnnotation](/reference/api/csharp/aspire.hosting/iresourceannotation.md)

Annotation that indicates a resource should use a specific container registry as its default target.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

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

## Remarks

This annotation is automatically added to resources when a container registry is added to the application model. It provides a default registry for resources that don't have an explicit [ContainerRegistryReferenceAnnotation](/reference/api/csharp/aspire.hosting/containerregistryreferenceannotation.md).

## Constructors

- [RegistryTargetAnnotation(IContainerRegistry)](/reference/api/csharp/aspire.hosting/registrytargetannotation/constructors.md#constructor-icontainerregistry) -- Annotation that indicates a resource should use a specific container registry as its default target.

## Properties

- [Registry](/reference/api/csharp/aspire.hosting/registrytargetannotation/properties.md#registry) : [IContainerRegistry](/reference/api/csharp/aspire.hosting/icontainerregistry.md) `get` -- Gets the container registry resource.
