# ContainerFileBase

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ContainerFileSystemCallbackAnnotation.cs)
- Inherits: [ContainerFileSystemItem](/reference/api/csharp/aspire.hosting/containerfilesystemitem.md)

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

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public abstract class ContainerFileBase
    : Aspire.Hosting.ApplicationModel.ContainerFileSystemItem
{
    // ...
}
```

## Properties

- [Contents](/reference/api/csharp/aspire.hosting/containerfilebase/properties.md#contents) : `string?` `get; set` -- 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.
- [ContinueOnError](/reference/api/csharp/aspire.hosting/containerfilebase/properties.md#continueonerror) : `bool?` `get; set` -- If true, errors creating this file will be ignored and the container creation will continue. Defaults to false.
- [SourcePath](/reference/api/csharp/aspire.hosting/containerfilebase/properties.md#sourcepath) : `string?` `get; set` -- 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.
