Skip to content
DocsTry Aspire
DocsTry

withEnvironment

Method
📦 Aspire.Hosting v13.4.0
interface ContainerResource {
// ... omitted for brevity
withEnvironment(
name: string,
value: IExpressionValue): IResourceWithEnvironment;
}

Signature

methodwithEnvironmentbuilder
Sets an environment variable
withEnvironment(
name: string,
value: IExpressionValue): IResourceWithEnvironment
namestring
valueIExpressionValue
IResourceWithEnvironment

Applies to

This method applies to the following types: