Watch Aspire live streamsDocsTry Aspire

VolumeMountBindingAnnotation Methods

ClassMethods1 member
Describes how a named volume binds to a resource across the inner and outer loop.
ResolvePath(EnvironmentCallbackContext)Section titled ResolvePath(EnvironmentCallbackContext)string
Resolves the storage path the workload should use for the current execution mode.
public sealed class VolumeMountBindingAnnotation
{
public string ResolvePath(
EnvironmentCallbackContext context)
{
// ...
}
}
contextEnvironmentCallbackContextThe environment callback context being evaluated.
stringVolumeMountBindingAnnotation.MountPath when publishing or when the workload runs as a container, and otherwise a local host directory.
InvalidOperationException Thrown when the deployed mount path is required but this binding does not declare one.