# GoAppResource.WithModDownload

- Module: [Aspire.Hosting.Go](/reference/api/go/aspire.hosting.go.md)
- Defined on: [GoAppResource](/reference/api/go/aspire.hosting.go/goappresource.md)
- Version: `17.0.0`
- Kind: `method`

Runs `go mod download` before starting the application, pre-fetching all module dependencies into the local module cache without modifying `go.sum`. The main application waits for the download step to complete successfully before launching.

## Definition

```go
type GoAppResource interface {
    // ... omitted for brevity
    WithModDownload() GoAppResource
}
```

## Signature

```go
WithModDownload() GoAppResource
```

## Returns

[`GoAppResource`](/reference/api/go/aspire.hosting.go/goappresource.md) -- The resource builder.

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

## Defined on

- [GoAppResource](/reference/api/go/aspire.hosting.go/goappresource.md) -- `handle`
