# ContainerFileBase Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ContainerFileBase](/reference/api/csharp/aspire.hosting/containerfilebase.md)
- Kind: `Properties`
- Members: `3`

Base class for files in the container file system (as compared to directories).

## Contents

- Name: `Contents`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ContainerFileSystemCallbackAnnotation.cs)

The contents of the file. Setting Contents is mutually exclusive with [ContainerFileBase.SourcePath](/reference/api/csharp/aspire.hosting/containerfilebase/properties.md#sourcepath). If both are set, an exception will be thrown.

```csharp
public string? Contents { get; set; }
```

## ContinueOnError

- Name: `ContinueOnError`
- Modifiers: `nullable` `get; set`
- Returns: `bool?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ContainerFileSystemCallbackAnnotation.cs)

If true, errors creating this file will be ignored and the container creation will continue. Defaults to false.

```csharp
public bool? ContinueOnError { get; set; }
```

## SourcePath

- Name: `SourcePath`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ContainerFileSystemCallbackAnnotation.cs)

The path to a file on the host system to copy into the container. This path must be absolute and point to a file on the host system. Setting SourcePath is mutually exclusive with [ContainerFileBase.Contents](/reference/api/csharp/aspire.hosting/containerfilebase/properties.md#contents). If both are set, an exception will be thrown.

```csharp
public string? SourcePath { get; set; }
```
