# WithEnvironmentVariablesConfig

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`ExecutionConfigurationBuilder`](/reference/api/go/aspire.hosting/executionconfigurationbuilder.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Adds an environment variables configuration gatherer to the builder.

## Definition

```go
func (ExecutionConfigurationBuilder) WithEnvironmentVariablesConfig() ExecutionConfigurationBuilder
```

## Returns

[`ExecutionConfigurationBuilder`](/reference/api/go/aspire.hosting/executionconfigurationbuilder.md) -- The builder with the configuration gatherer added.

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

## Applies to

- [`ExecutionConfigurationBuilder`](/reference/api/go/aspire.hosting/executionconfigurationbuilder.md)
