# BeforePublishEvent Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [BeforePublishEvent](/reference/api/csharp/aspire.hosting/beforepublishevent.md)
- Kind: `Properties`
- Members: `2`

This event is published before the distributed application is published.

## Model

- Name: `Model`
- Modifiers: `get`
- Returns: [DistributedApplicationModel](/reference/api/csharp/aspire.hosting/distributedapplicationmodel.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Publishing/BeforePublishEvent.cs#L25)

The [DistributedApplicationModel](/reference/api/csharp/aspire.hosting/distributedapplicationmodel.md) instance.

```csharp
public DistributedApplicationModel Model { get; }
```

## Services

- Name: `Services`
- Modifiers: `get`
- Returns: `IServiceProvider`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Publishing/BeforePublishEvent.cs#L20)

The `IServiceProvider` for the app host.

```csharp
public IServiceProvider Services { get; }
```
