Skip to content
Docs Try Aspire

Aspire.Hosting

Official
📦 Aspire.Hosting v13.1.2 net10.0
302 Types
7 Namespaces
Aspire.Hosting (56)
class ConnectionPropertiesExtensions static
Provides extension methods for adding connection properties to resources.
class ConnectionStringBuilderExtensions static
Provides extension methods for adding connection string resources to an application.
class ConnectionStringResource sealed
Adds a connection string to the distributed application a resource with the specified expression.
class ContainerRegistryResourceBuilderExtensions static
Provides extension methods for adding container registry resources to the distributed application.
class ContainerResourceBuilderExtensions static
Provides extension methods for IDistributedApplicationBuilder to add container resources to the application.
class ContainerResourceExtensions static
Provides extension methods for working with container resources in a distributed application model.
class CustomResourceExtensions static
Extension methods for applying dashboard annotations to resources.
class DistributedApplication
Represents a distributed application that implements the Hosting.IHost and IAsyncDisposable interfaces.
class DistributedApplicationBuilder
class DistributedApplicationBuilderExtensions static
class DistributedApplicationEventingExtensions static
class DistributedApplicationException
Represents an exception that is thrown when a distributed application error occurs.
class DistributedApplicationExecutionContext
Exposes the global contextual information for this invocation of the AppHost.
class DistributedApplicationExecutionContextOptions
enum DistributedApplicationOperation
Describes the context in which the AppHost is being executed.
class DistributedApplicationOptions sealed
class EmulatorResourceExtensions static
Extension methods for managing emulator resources.
class ExecutableResourceBuilderExtensions static
class ExecutableResourceExtensions static
class ExternalServiceBuilderExtensions static
Provides extension methods for adding external services to an application.
class ExternalServiceResource sealed
Represents an external service resource with service discovery capabilities.
interface IDeveloperCertificateService
Service that provides information about developer certificate trust capabilities.
interface IDistributedApplicationBuilder
interface IFileSystemService
Service for managing Aspire directories.
interface IInteractionService
A service to interact with the current development environment.
class InputLoadOptions sealed
Represents configuration options for dynamically loading input data.
class InputsDialogInteractionOptions
Options for configuring an inputs dialog interaction.
class InputsDialogValidationContext sealed
Represents the context for validating inputs in an inputs dialog interaction.
enum InputType
class InteractionInput sealed
Represents an input for an interaction.
class InteractionInputCollection sealed
A collection of interaction inputs that supports both indexed and name-based access.
class InteractionOptions
Optional configuration for interactions added with Hosting.InteractionService.
class InteractionResult static
Provides a set of static methods for the Hosting.InteractionResult`1.
class InteractionResult<T>
Represents the result of an interaction.
interface IProjectMetadata
Represents metadata about a project resource.
interface IResourceWithContainerFiles
Represents a resource that contains files that can be copied to other resources.
interface IResourceWithServiceDiscovery
A resource that supports exporting service discovery information.
interface ITempFileSystemService
Service for managing temporary directories and files within Aspire.
interface IUserSecretsManager
Defines an interface for managing user secrets with support for read and write operations.
class LaunchProfile sealed
class LaunchSettings sealed
class LoadInputContext sealed
class MessageBoxInteractionOptions
Options for configuring a message box interaction.
enum MessageIntent
Specifies the intent or purpose of a message in an interaction.
class MissingParameterValueException
The exception that is thrown when a parameter resource cannot be initialized because its value is missing or cannot be resolved.
class NotificationInteractionOptions
Options for configuring a notification interaction.
class OtlpConfigurationExtensions static
Provides extension methods for configuring OpenTelemetry in projects using environment variables.
enum OtlpProtocol
Protocols available for OTLP exporters.
class ParameterProcessor sealed
Handles processing of parameter resources during application orchestration.
class ParameterResourceBuilderExtensions static
Provides extension methods for adding parameter resources to an application.
class ProjectResourceBuilderExtensions static
class ProjectResourceOptions
Various properties to modify the behavior of the project resource.
class ResourceBuilderExtensions static
Provides extension methods for configuring resources with environment variables.
class TempDirectory abstract
Represents a temporary directory that will be deleted when disposed.
class TempFile abstract
Represents a temporary file that will be deleted when disposed.
class VolumeNameGenerator static
Utility class for generating volume names.
Aspire.Hosting.ApplicationModel (199)
class AfterEndpointsAllocatedEvent obsolete
This event is published after all endpoints have been allocated.
class AfterResourcesCreatedEvent
This event is published after all resources have been created.
class AllocatedEndpoint
Represents an endpoint allocated for a service instance.
class AspireStoreExtensions static
class BeforeResourceStartedEvent
This event is raised by orchestrators before they have started a new resource.
class BeforeStartEvent
This event is published before the application starts.
class CertificateAuthorityCollection
Represents a collection of certificate authorities within the application model.
class CertificateAuthorityCollectionAnnotation sealed
An annotation that indicates a resource is referencing a certificate authority collection.
class CertificateAuthorityCollectionResourceExtensions static
class CertificateTrustConfigurationCallbackAnnotation sealed
An annotation that indicates a resource wants to manage how custom certificate trust is configured.
class CertificateTrustConfigurationCallbackAnnotationContext sealed
class CertificateTrustExecutionConfigurationContext
Context for configuring certificate trust configuration properties.
class CertificateTrustExecutionConfigurationData
Metadata about the resource certificate trust configuration.
enum CertificateTrustScope
class CommandLineArgsCallbackAnnotation
Represents an annotation that provides a callback to be executed with a list of command-line arguments when an executable resource is started.
class CommandLineArgsCallbackContext sealed
Represents a callback context for the list of command-line arguments associated with an executable resource.
class CommandOptions
class CommandResults static
class ConnectionPropertyAnnotation sealed
Annotation that creates a custom connection property value injected into environment variables when a resource is referenced using WithReference().
class ConnectionStringAvailableEvent
The ConnectionStringAvailableEvent is raised when a connection string becomes available for a resource.
class ConnectionStringRedirectAnnotation
Links to a resource that implements IResourceWithConnectionString that can be used by the containing resource to acquire a connection string.
class ConnectionStringReference
Represents a reference to a connection string.
class ContainerBuildOptionsCallbackAnnotation sealed
Annotation that provides a callback to configure container build options for a resource.
class ContainerBuildOptionsCallbackContext sealed
Context for configuring container build options via a callback.
class ContainerCertificatePathsAnnotation sealed
An annotation that allows overriding default certificate paths for container resources.
class ContainerDirectory sealed
Represents a directory in the container file system.
class ContainerFile sealed
Represents a standard file in the container file system.
class ContainerFileBase abstract
Base class for files in the container file system (as compared to directories).
class ContainerFilesDestinationAnnotation sealed
Represents an annotation that specifies a source resource and destination path for copying container files.
class ContainerFilesSourceAnnotation sealed
Represents an annotation that associates a container file/directory with a resource.
class ContainerFileSystemCallbackAnnotation sealed
Represents a callback annotation that specifies files and folders that should be created or updated in a container.
class ContainerFileSystemCallbackContext sealed
class ContainerFileSystemCallbackHttpsCertificateContext sealed
class ContainerFileSystemItem abstract
Represents a base class for file system entries in a container.
class ContainerImageAnnotation sealed
Represents an annotation for a container image.
class ContainerImagePullPolicyAnnotation sealed
Annotation that controls the image pull policy for a container resource.
class ContainerImagePushOptions sealed
Represents options for pushing container images to a registry.
class ContainerImagePushOptionsCallbackAnnotation sealed
Represents an annotation that configures container image push options via a callback function.
class ContainerImagePushOptionsCallbackContext sealed
Provides context information for container image push options callbacks.
class ContainerImageReference
Represents the fully‑qualified container image reference that should be deployed.
enum ContainerLifetime
Lifetime modes for container resources.
class ContainerLifetimeAnnotation sealed
Annotation that controls the lifetime of a container resource.
class ContainerMountAnnotation sealed
Represents a mount annotation for a container resource.
enum ContainerMountType
Represents the type of a container mount.
class ContainerNameAnnotation sealed
Represents an annotation for a custom container name.
class ContainerNetworkAliasAnnotation sealed
Represents an annotation for a custom network alias for a container resource.
class ContainerOpenSSLCertificateFile sealed
Represents an OpenSSL public certificate in the container file system. Must be PEM encoded. An OpenSSL compatible symlink pointing to the destination file will be created in the same container folder as the certificate file named [subject hash].[n], where [n] is a sequence number that increases for each certificate in a target folder with the same subject hash.
class ContainerPortReference
Represents a TCP/UDP port that a container can expose.
class ContainerRegistryReferenceAnnotation
Annotation that indicates a resource is using a specific container registry.
class ContainerRegistryResource
Represents a general-purpose container registry resource that can be used to reference external container registries (e.g., Docker Hub, GitHub Container Registry, or private registries) in the application model.
class ContainerResource
A resource that represents a specified container.
class ContainerRuntimeArgsCallbackAnnotation sealed
Represents an additional argument to pass to the container runtime run command.
class ContainerRuntimeArgsCallbackContext sealed
Represents a callback context for the list of command-line arguments to be passed to the container runtime run command.
class CSharpAppResource
A resource that represents a specified C# project or file-based app.
class CustomResourceKnownProperties static
Known properties for resources that show up in the dashboard.
record CustomResourceSnapshot sealed
An immutable snapshot of the state of a resource.
class DefaultLaunchProfileAnnotation sealed
An annotation that specifies the default launch profile for a resource.
class DeploymentTargetAnnotation sealed
Represents an annotation for a deployment target.
class DisableForwardedHeadersAnnotation sealed
Represents an annotation that disables enabling forwarded headers on ASP.NET Core projects on publish.
class DistributedApplicationModel
Represents a distributed application.
class DistributedApplicationModelExtensions static
class DockerBuildArg sealed obsolete
class DockerfileBaseImageAnnotation
Represents an annotation for specifying custom base images in generated Dockerfiles.
class DockerfileBuildAnnotation
Represents an annotation for customizing a Dockerfile build.
class DockerfileBuilderCallbackAnnotation
Represents an annotation for providing callbacks to programmatically modify Dockerfile builds.
class DockerfileBuilderCallbackContext
Provides context information for Dockerfile build callbacks.
class DockerfileFactoryContext sealed
Provides context for Dockerfile factory functions.
class EmulatorResourceAnnotation sealed
Represents an annotation for an emulator resource that should be ignored by provisioners.
class EndpointAnnotation sealed
Represents an endpoint annotation that describes how a service should be bound to a network.
enum EndpointBindingMode
Specifies how an endpoint is bound to network addresses.
class EndpointHostHelpers static
Provides helper methods for validating localhost addresses.
class EndpointNameAttribute sealed
Signifies that a parameter represents an endpoint name.

Decorate String parameters representing endpoint names with this attribute, e.g.:

public static IResourceBuilder<TResource> WithCustomEndpoint<TResource>(
this IResourceBuilder<TResource> builder,
[EndpointName] string name)

class EndpointProbeAnnotation sealed
Represents an annotation that specifies the HTTP probes (health, readiness, liveness, etc.) of a resource.
enum EndpointProperty
Represents the properties of an endpoint that can be referenced.
class EndpointReference sealed
Represents an endpoint reference for a resource with endpoints.
class EndpointReferenceExpression
Represents a property expression for an endpoint reference.
class EnvironmentCallbackAnnotation
Represents an annotation that provides a callback to modify the environment variables of an application.
class EnvironmentCallbackContext
Represents a callback context for environment variables associated with a publisher.
record EnvironmentVariableSnapshot sealed
A snapshot of an environment variable.
class ExcludeLaunchProfileAnnotation sealed
Represents an annotation that indicates that launch settings should not be used.
class ExecutableAnnotation sealed
Represents an annotation for a container image.
class ExecutableResource
A resource that represents a specified executable process.
class ExecuteCommandContext sealed
class ExecuteCommandResult sealed
class ExecutionConfigurationBuilder sealed
Provides a builder for constructing an IExecutionConfigurationResult for a specific resource in the distributed application model. This resolves command line arguments and environment variables and potentially additional metadata through registered gatherers.
class ExecutionConfigurationBuilderExtensions static
class ExecutionConfigurationResultExtensions static
class ExplicitStartupAnnotation sealed
Represents an annotation for instructing the resource not to be started with the app host.
struct ExpressionInterpolatedStringHandler
class GenerateParameterDefault sealed
Represents that a default value should be generated.
class HealthCheckAnnotation
An annotation which tracks the name of the health check used to detect to health of a resource.
record HealthReportSnapshot sealed
A report produced by a health check about a resource.
record HostUrl
Represents a URL on the host machine. When referenced in a container resource, localhost will be replaced with the configured container host name.
class HttpCommandOptions
class HttpCommandRequestContext sealed
class HttpCommandResultContext sealed
class HttpsCertificateAnnotation sealed
An annotation that associates an HTTPS/TLS server certificate with a resource.
class HttpsCertificateConfigurationCallbackAnnotation sealed
An annotation that indicates a resource wants to manage how it needs to be configured to use a specific TLS certificate pair.
class HttpsCertificateConfigurationCallbackAnnotationContext sealed
class HttpsCertificateExecutionConfigurationContext
Configuration context for server authentication certificate configuration.
class HttpsCertificateExecutionConfigurationData
Metadata for HTTPS/TLS server certificate configuration.
interface IAspireStore
Represents a store for managing files in the Aspire hosting environment that can be reused across runs.
interface IComputeEnvironmentResource
Represents a compute environment resource.
interface IComputeResource
Represents a compute resource.
interface IContainerFilesDestinationResource
interface IContainerRegistry
Represents container registry information for deployment targets.
enum IconVariant
The icon variant.
interface IExecutionConfigurationBuilder
Builder for gathering and resolving the execution configuration (arguments and environment variables) for a specific resource.
interface IExecutionConfigurationData
Additional data associated with a resource's execution configuration. This allows gatherers to provide additional data required to properly configure or run the resource.
interface IExecutionConfigurationGatherer
Gathers resource configurations (arguments and environment variables) and optionally applies additional metadata to the resource.
interface IExecutionConfigurationGathererContext
Resource configuration gatherer context.
interface IExecutionConfigurationResult
Configuration (arguments and environment variables) to apply to a specific resource.
enum ImagePullPolicy
Image pull policies for container resources.
interface IManifestExpressionProvider
An interface that allows an object to express how it should be represented in a manifest.
interface IModelNameParameter
Signifies that a parameter represents a model name.
class InitializeResourceEvent
This event is raised by orchestrators to signal to resources that they should initialize themselves.
class InputGeneratorAnnotation
Annotation for customizing the input generation for a parameter.
interface IPortAllocator
Provides port allocation functionality for resources.
interface IResource
Represents a resource that can be hosted by an application.
interface IResourceAnnotation
Represents an annotation for a resource.
interface IResourceBuilder<T>
Defines a builder for creating resources of type T.
interface IResourceCollection
Represents a collection of resources.
interface IResourceWithArgs
Represents a resource that is associated with commandline arguments.
interface IResourceWithConnectionString
Represents a resource that has a connection string associated with it.
interface IResourceWithEndpoints
Represents a resource that has endpoints associated with it.
interface IResourceWithEnvironment
Represents a resource that is associated with an environment.
interface IResourceWithoutLifetime
Represents a resource that does not have a lifetime. Reserved for resources that are just holders of data or references to other resources.
interface IResourceWithParameters
Represents a resource that has parameters.
interface IResourceWithParent
Represents a resource that has a parent resource.
interface IResourceWithParent<T>
Represents a resource that has a parent resource of type T.
interface IResourceWithProbes
Represents a resource that has probes associated with it.
interface IResourceWithWaitSupport
Represents a resource that can wait for other resources to be running, health, and/or completed.
interface IValueProvider
An interface that allows the value to be provided for an environment variable.
interface IValueWithReferences
An interface that allows the value to list its references.
class KnownHostNames static
Provides known host names for use within the Aspire application model API.
class KnownNetworkIdentifiers static
Provides known network identifiers for use within the Aspire application model API.
class KnownResourceCommands static
Provides constants for well-known resource command names.
class KnownResourceStates static
The set of well known resource states.
class KnownResourceStateStyles static
The set of well known resource states.
class LaunchProfileAnnotation sealed
Represents an annotation that specifies the launch profile name for a resource.
struct LogLine readonly
Represents a console log line.
struct LogSubscriber readonly
Represents a log subscriber for a resource.
class ManifestPublishingCallbackAnnotation
Represents an annotation that provides a callback to be executed during manifest publishing.
record NetworkEndpointSnapshot
Represents an AllocatedEndpoint snapshot associated with a specific network.
class NetworkEndpointSnapshotList
Holds a list of NetworkEndpointSnapshot for an Endpoint, providing thread-safe enumeration and addition.
record NetworkIdentifier
A network identifier used to specify the network context for resources within an Aspire application model.
class OtlpExporterAnnotation
An annotation which indicates that a resource has OTLP exporter configured.
class ParameterDefault abstract
Represents how a default value should be retrieved.
class ParameterResource
Represents a parameter resource.
class PortAllocator sealed
Allocates and manages a range of ports for use in an application context.
class ProbeAnnotation abstract
Represents an annotation that specifies the probes (health, readiness, liveness, etc.) of a resource.
enum ProbeType
Enum representing the type of probe.
class ProjectResource
A resource that represents a specified .NET project.
class ProjectResourceExtensions static
class ProxySupportAnnotation sealed
Proxy support annotation for a resource, used to disable all endpoint proxies for a resource if desired
class ReferenceEnvironmentInjectionAnnotation sealed
Annotation that specifies which connection and endpoint information should be injected into environment variables when a resource is referenced using WithReference().
enum ReferenceEnvironmentInjectionFlags
Specifies which connection or endpoint information should be injected into environment variables when WithReference() is invoked.
class ReferenceExpression
Represents an expression that might be made up of multiple resource properties. For example, a connection string might be made up of a host, port, and password from different endpoints.
class ReferenceExpressionBuilder
struct ReferenceExpressionBuilderInterpolatedStringHandler
class RegistryTargetAnnotation sealed
Annotation that indicates a resource should use a specific container registry as its default target.
record RelationshipSnapshot sealed
A snapshot of a relationship.
class ReplicaAnnotation sealed
Represents an annotation that specifies the number of replicas for a resource.
class ResolvedEndpoint sealed
Represents a resolved endpoint with computed target and exposed ports.
struct ResolvedPort readonly
Represents a resolved port with information about whether it was allocated or explicitly specified.
class Resource abstract
class ResourceAnnotationCollection sealed
Represents a collection of resource metadata annotations.
enum ResourceAnnotationMutationBehavior
class ResourceCommandAnnotation sealed
Represents a command annotation for a resource.
class ResourceCommandService
A service to execute resource commands.
record ResourceCommandSnapshot sealed
A snapshot of a resource command.
enum ResourceCommandState
The state of a resource command.
class ResourceEndpointsAllocatedEvent
This event is raised by orchestrators to signal to resources that their endpoints have been allocated.
class ResourceEvent
Represents a change in the state of a resource.
class ResourceExtensions static
class ResourceIconAnnotation sealed
Specifies the icon to use when displaying a resource in the dashboard.
class ResourceLoggerService
A service that provides loggers for resources to write to.
class ResourceNameAttribute sealed
Signifies that a parameter represents a resource name.

Decorate String parameters representing resource names with this attribute, e.g.:

public static IResourceBuilder<MyResource> AddCustomResource(
this IDistributedApplicationBuilder builder,
[ResourceName] string name)

class ResourceNotificationService
A service that allows publishing and subscribing to changes in the state of a resource.
class ResourceNotificationServiceOptions sealed
record ResourcePropertySnapshot sealed
A snapshot of the resource property.
class ResourceReadyEvent
Event that is raised when a resource initially transitions to a ready state.
class ResourceRelationshipAnnotation sealed
An annotation which represents the relationship between two resources.
class ResourceSnapshotAnnotation
An annotation that represents the initial snapshot of a resource.
record ResourceStateSnapshot sealed
A snapshot of the resource state
class ResourceStoppedEvent
This event is raised after a resource has stopped.
class ResourceUrlAnnotation sealed
A URL that should be displayed for a resource.
class ResourceUrlsCallbackAnnotation sealed
Represents an annotation that provides a callback to modify URLs that should be displayed for the resource.
class ResourceUrlsCallbackContext
Represents a callback context for resource URLs.
class UpdateCommandStateContext sealed
enum UrlDisplayLocation
Specifies where the URL should be displayed.
record UrlDisplayPropertiesSnapshot sealed
A snapshot of the display properties for a url.
record UrlSnapshot sealed
A snapshot of the URL.
class ValueProviderContext
Provides context for value resolution.
class ValueSnapshot<T> sealed
Provides an asynchronously initialized value that: - Can be awaited via GetValueAsync() until the first value or exception is set. - Exposes the latest value after it has been set (supports re-setting). - Tracks whether a value or exception was ever set via IsValueSet. - Supports setting an exception that will be thrown by GetValueAsync. Thread-safe for concurrent SetValue / SetException / GetValueAsync calls.
record VolumeSnapshot sealed
A snapshot of a volume, mounted to a container.
class WaitAnnotation sealed
Represents a wait relationship between two resources.
enum WaitBehavior
Specifies the behavior of the wait.
enum WaitType
Specifies the type of Wait applied to dependency resources.
Aspire.Hosting.ApplicationModel.Docker (4)
Aspire.Hosting.Eventing (7)
Aspire.Hosting.Lifecycle (4)
Aspire.Hosting.Pipelines (22)
enum CompletionState
Represents the completion state of a publishing activity (task, step, or top-level operation).
class DeploymentStateSection sealed
Represents a section of deployment state with version tracking for concurrency control.
interface IDeploymentStateManager
Provides deployment state management functionality.
interface IDistributedApplicationPipeline
Represents a pipeline for executing deployment steps in a distributed application.
interface IPipelineActivityReporter
Interface for reporting publishing activities.
interface IPipelineOutputService
Service for managing pipeline output directories.
interface IReportingStep
Represents a publishing step, which can contain multiple tasks.
interface IReportingTask
Represents a publishing task, which belongs to a step.
class NullPublishingActivityReporter sealed
class PipelineConfigurationAnnotation
An annotation that registers a callback to execute during the pipeline configuration phase, allowing modification of step dependencies and relationships.
class PipelineConfigurationContext
Provides contextual information for pipeline configuration callbacks.
class PipelineContext sealed
Provides contextual information and services for the pipeline execution process of a distributed application.
class PipelineOptions
Represents the options for executing a pipeline.
class PipelineStep
Represents a step in the deployment pipeline.
class PipelineStepAnnotation
An annotation that creates pipeline steps for a resource during deployment.
class PipelineStepContext sealed
Provides contextual information for a specific pipeline step execution.
class PipelineStepExtensions static
Extension methods for pipeline steps.
class PipelineStepFactoryContext
class PipelineStepFactoryExtensions static
Provides extension methods for adding pipeline steps to resources.
class PublishingExtensions static
Extension methods for IReportingStep and IReportingTask to provide direct operations.
class WellKnownPipelineSteps static
Defines well-known pipeline step names used in the deployment pipeline.
class WellKnownPipelineTags static
Defines well-known pipeline tags used to categorize pipeline steps.
Aspire.Hosting.Publishing (10)