Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithEndpointsInEnvironment

Method
📦 Aspire.Hosting v17.0.0
func (ProjectResource) WithEndpointsInEnvironment(endpointNames []string) ProjectResource

Signature

methodWithEndpointsInEnvironmentbuilder
Includes only the specified project endpoint names in environment-variable injection.
WithEndpointsInEnvironment(endpointNames []string) ProjectResource
endpointNames[]stringThe endpoint names to include in environment variables.
ProjectResource

The same project resource builder handle for chaining.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: