Skip to content

AddReference between containers #1197

@simonhoss

Description

@simonhoss

Hey

I'm trying to connect to container together with WithReference. But I'm not able to get the AllocatedEndpointAnnotation.

Here is a very simple example. (I'm aware that this would not make a lot of sense ;) )

var redis = builder.AddRedisContainer("redis");
var rabbitMq = builder.AddRabbitMQContainer("rabbitmq");

rabbitMq.WithReference(redis);

When I start the application locally on my mac. I get the error: Aspire.Hosting.DistributedApplicationException: Redis resource does not have endpoint annotation.

This is the same behavior when I try to reference my custom containers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions