RadiusBackingResourceProjectionException
Radius.Compute/containers workload — cannot be projected to its consumers: its address cannot be determined, or the recipe's own connection and credential outputs cannot be described. namespace Aspire.Hosting.Radius;
public sealed class RadiusBackingResourceProjectionException : System.InvalidOperationException{ // ...}Remarks
Section titled Remarks A backing resource's Kubernetes objects and credentials are created by its recipe, so no value derived from the Aspire endpoint model describes it. The Radius publisher projects the address out of the recipe's own outputs instead. Every other route to that address — including Radius and the cross-environment endpoint resolution other compute publishers use — would have to guess, so it throws this exception rather than emitting an address that silently resolves to nothing. See https://github.com/microsoft/aspire/issues/18935.
This type is public because it can surface from a Kubernetes, Azure Container Apps, or Azure App Service publish: those publishers resolve a cross-environment reference through the Radius environment that owns the resource. Catching it requires a type an AppHost author can name.
It derives from Invalid to match the package's publish-time failure convention. Note that Azure 's validation pass catches Invalid around its context lookup; that catch does not cover environment-variable resolution, so this exception is not swallowed there.
Constructors2
Section titled ConstructorsRadiusBackingResourceProjectionException class. RadiusBackingResourceProjectionException class with a reference to the inner exception that is the cause of this exception. Properties1
Section titled PropertiesExamples
Section titled ExamplesDeploying the consumer and the backing resource to the same Radius environment resolves the address case. An AppHost that publishes several environments can report the offending resource:
try{ await app.RunAsync();}catch (RadiusBackingResourceProjectionException ex){ Console.Error.WriteLine($"'{ex.Resource.Name}' is provisioned by a Radius recipe and cannot " + $"be projected to its consumers: {ex.Message}");}