71 references to DistributedApplicationException
Aspire.Hosting (41)
ApplicationModel\ConnectionStringReference.cs (1)
30throw new DistributedApplicationException($"The connection string for the resource '{Resource.Name}' is not available.");
ApplicationModel\ResourceNotificationService.cs (6)
139throw new DistributedApplicationException($"Dependency resource '{dependency.Name}' failed to start."); 149throw new DistributedApplicationException( 190throw new DistributedApplicationException("WaitForCompletion cannot be used with resources that have replicas."); 207throw new DistributedApplicationException($"Dependency resource '{dependency.Name}' failed to start."); 219throw new DistributedApplicationException( 252_ => throw new DistributedApplicationException($"Unexpected wait type: {waitAnnotation.WaitType}")
Dashboard\DashboardLifecycleHook.cs (1)
97throw new DistributedApplicationException("Dashboard path empty or file does not exist.");
Dcp\ApplicationExecutor.cs (3)
1521throw new DistributedApplicationException($"Couldn't find required {nameof(DcpInstancesAnnotation)} annotation on resource {resource.Name}."); 1532throw new DistributedApplicationException($"Couldn't find required instance ID for index {instanceIndex} on resource {resource.Name}."); 2153throw new DistributedApplicationException($"Failed to delete '{resource.Metadata.Name}' successfully before restart.");
Dcp\DcpDependencyCheck.cs (3)
85throw new DistributedApplicationException(string.Format( 111throw new DistributedApplicationException(string.Format( 160throw new DistributedApplicationException(string.Format(
Devcontainers\Codespaces\CodespacesOptions.cs (1)
51return configuration.GetValue<string>(key) ?? throw new DistributedApplicationException($"Codespaces was detected but {key} environment missing.");
Devcontainers\DevcontainerSettingsWriter.cs (2)
31throw new DistributedApplicationException($"Failed to acquire semaphore for settings file: {settingsPath}"); 86throw new DistributedApplicationException("Codespaces or Devcontainer not detected.");
DistributedApplicationBuilder.cs (2)
411throw new DistributedApplicationException($"Multiple resources with the name '{duplicateResourceName}'. Resource names are case-insensitive."); 434throw new DistributedApplicationException($"Cannot add resource of type '{resource.GetType()}' with name '{resource.Name}' because resource of type '{existingResource.GetType()}' with that name already exists. Resource names are case-insensitive.");
Exceptions.cs (1)
9public FailedToApplyEnvironmentException(string message) : base(message) { }
ParameterResourceBuilderExtensions.cs (2)
146?? throw new DistributedApplicationException($"Parameter resource could not be used because configuration key '{configurationKey}' is missing and the Parameter has no default value."); ; 224return builder.Configuration.GetConnectionString(name) ?? throw new DistributedApplicationException($"Connection string parameter resource could not be used because connection string '{name}' is missing.");
Publishing\ManifestPublisher.cs (2)
34throw new DistributedApplicationException( 50var manifestPath = _options.Value.OutputPath ?? throw new DistributedApplicationException("The '--output-path [path]' option was not specified even though '--publisher manifest' argument was used.");
Publishing\ManifestPublishingContext.cs (5)
61var manifestDirectory = Path.GetDirectoryName(fullyQualifiedManifestPath) ?? throw new DistributedApplicationException("Could not get directory name of output path"); 151throw new DistributedApplicationException("Project metadata not found."); 263throw new DistributedApplicationException("Could not get container image name."); 503_ => throw new DistributedApplicationException($"The value of the environment variable '{key}' is not supported.") 544_ => throw new DistributedApplicationException($"The value of the argument '{arg}' is not supported.")
ResourceBuilderExtensions.cs (9)
532throw new DistributedApplicationException($"Endpoint with name '{annotation.Name}' already exists. Endpoint name may not have been explicitly specified and was derived automatically from scheme argument (e.g. 'http', 'https', or 'tcp'). Multiple calls to WithEndpoint (and related methods) may result in a conflict if name argument is not specified. Each endpoint must have a unique name. For more information on networking in .NET Aspire see: https://aka.ms/dotnet/aspire/networking"); 692throw new DistributedApplicationException($"The '{builder.Resource.Name}' resource cannot wait for itself."); 697throw new DistributedApplicationException($"The '{builder.Resource.Name}' resource cannot wait for its parent '{dependency.Resource.Name}'."); 747throw new DistributedApplicationException($"The '{builder.Resource.Name}' resource cannot wait for itself."); 752throw new DistributedApplicationException($"The '{builder.Resource.Name}' resource cannot wait for its parent '{dependency.Resource.Name}'."); 803throw new DistributedApplicationException($"Resource '{builder.Resource.Name}' already has a health check with key '{key}'."); 864throw new DistributedApplicationException($"The endpoint '{endpointName}' does not exist on the resource '{builder.Resource.Name}'."); 869throw new DistributedApplicationException($"The endpoint '{endpointName}' on resource '{builder.Resource.Name}' was not using the '{desiredScheme}' scheme."); 895throw new DistributedApplicationException($"The URI for the health check is not set. Ensure that the resource has been allocated before the health check is executed.");
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (3)
18throw new DistributedApplicationException(Resources.ProjectDoesNotContainMetadataExceptionMessage); 49throw new DistributedApplicationException(message); 66throw new DistributedApplicationException(message);
Aspire.Hosting.Azure (2)
Exceptions.cs (2)
9public AzureCliNotOnPathException(string message) : base(message) { } 16public FailedToApplyEnvironmentException(string message) : base(message) { }
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
133throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{builder.Resource.Name}' resource but the connection string was null.");
Aspire.Hosting.Azure.EventHubs (3)
AzureEventHubsExtensions.cs (3)
166?? throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{builder.Resource.Name}' resource but the connection string was null."); 178throw new DistributedApplicationException($"The '{builder.Resource.Name}' resource does not have any Event Hubs."); 184sp => client ?? throw new DistributedApplicationException("EventHubProducerClient is not initialized"),
Aspire.Hosting.Azure.Functions (3)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (3)
18throw new DistributedApplicationException(Resources.ProjectDoesNotContainMetadataExceptionMessage); 49throw new DistributedApplicationException(message); 66throw new DistributedApplicationException(message);
Aspire.Hosting.Azure.Storage (1)
AzureStorageExtensions.cs (1)
114throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{builder.Resource.Name}' resource but the connection string was null.");
Aspire.Hosting.Dapr (1)
DaprDistributedApplicationLifecycleHook.cs (1)
45?? throw new DistributedApplicationException("Unable to locate the Dapr CLI.");
Aspire.Hosting.Elasticsearch (1)
ElasticsearchBuilderExtensions.cs (1)
66throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{elasticsearch.Name}' resource but the connection string was null.");
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
71throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{garnet.Name}' resource but the connection string was null.");
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
48throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{kafka.Name}' resource but the connection string was null.");
Aspire.Hosting.MongoDB (2)
MongoDBBuilderExtensions.cs (2)
69throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{mongoDBContainer.Name}' resource but the connection string was null."); 115throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{mongoDBDatabase.Name}' resource but the connection string was null.");
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
46throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{resource.Name}' resource but the connection string was null.");
Aspire.Hosting.Nats (1)
NatsBuilderExtensions.cs (1)
61?? throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{nats.Name}' resource but the connection string was null.");
Aspire.Hosting.Oracle (1)
OracleDatabaseBuilderExtensions.cs (1)
42throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{oracleDatabaseServer.Name}' resource but the connection string was null.");
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
61throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{postgresServer.Name}' resource but the connection string was null.");
Aspire.Hosting.Qdrant (1)
QdrantBuilderExtensions.cs (1)
56?? throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{qdrant.Name}' resource but the connection string was null.");
Aspire.Hosting.RabbitMQ (2)
RabbitMQBuilderExtensions.cs (2)
50throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{rabbitMq.Name}' resource but the connection string was null."); 191throw new DistributedApplicationException($"Cannot configure the RabbitMQ resource '{builder.Resource.Name}' to enable the management plugin as it uses an unrecognized container image registry, name, or tag.");
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
53throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{redis.Name}' resource but the connection string was null.");
Aspire.Hosting.SqlServer (1)
SqlServerBuilderExtensions.cs (1)
44throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{sqlServer.Name}' resource but the connection string was null.");
Aspire.Hosting.Tests (3)
DistributedApplicationTests.cs (3)
51throw new DistributedApplicationException(exceptionMessage); 92throw new DistributedApplicationException(exceptionMessage); 120throw new DistributedApplicationException(exceptionMessage);
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
69throw new DistributedApplicationException($"ConnectionStringAvailableEvent was published for the '{valkey.Name}' resource but the connection string was null.");
Stress.AppHost (1)
ResourceBuilderExtensions.cs (1)
45?? throw new DistributedApplicationException($"Could not create HTTP command for resource '{builder.Resource.Name}' as no endpoint named '{endpointName}' was found.");