# BeforeStartEvent

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

This event is published before the application starts.

## Remarks

Subscribing to this event is analogous to implementing the `BeforeStartAsync`
method. This event provides access to the `IServiceProvider` interface to resolve dependencies including
`DistributedApplicationModel` service which is passed in as an argument
in `BeforeStartAsync`.

## Definition

```go
type BeforeStartEvent interface {
    DistributedApplicationEvent
}
```

## Embeds

- [`DistributedApplicationEvent`](/reference/api/go/aspire.hosting/distributedapplicationevent.md)

## Properties

- `Model`: [`DistributedApplicationModel`](/reference/api/go/aspire.hosting/distributedapplicationmodel.md) `get` -- The `DistributedApplicationModel` instance.
- `Services`: [`ServiceProvider`](/reference/api/go/aspire.hosting/serviceprovider.md) `get` -- The `IServiceProvider` instance.
