Skip to content
16 changes: 14 additions & 2 deletions docs/core/sdk/file-based-apps.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: File-based apps
description: Learn how to create, build, and run C# applications from a single file without a project file.
ms.date: 12/05/2025
ms.date: 04/22/2026
ai-usage: ai-assisted
---
# File-based apps
Expand All @@ -21,7 +21,7 @@ In this article, learn how to create, configure, and work with file-based apps e

## Supported directives

File-based apps use directives prefixed with `#:` to configure the build and run the application. Supported directives include: `#:package`, `#:project`, `#:property`, and `#:sdk`. Place these directives at the top of the C# file.
File-based apps use directives prefixed with `#:` to configure the build and run the application. Supported directives include: `#:package`, `#:project`, `#:include`, `#:property`, and `#:sdk`. Place these directives at the top of the C# file.
Comment thread
adegeo marked this conversation as resolved.
Outdated

### `#:package`

Expand All @@ -44,6 +44,17 @@ References another project file or directory that contains a project file.
#:project ../SharedLibrary/SharedLibrary.csproj
```

### `#:include`
Comment thread
gewarren marked this conversation as resolved.
Outdated

Includes another C# source file in your file-based app.
Comment thread
adegeo marked this conversation as resolved.
Outdated

```csharp
#:include helpers.cs
#:include models/customer.cs
```

The `#:include` directive is available in .NET 11 Preview 3 and .NET SDK 10.0.3xx and later.

### `#:property`

Sets an MSBuild property value.
Expand Down Expand Up @@ -215,6 +226,7 @@ Different SDKs include other file types:

- `Microsoft.NET.Sdk.Web` includes `*.json` configuration files.
- Non-default SDKs include ResX resource files.
- Files referenced by `#:include` are included for compilation.
Comment thread
gewarren marked this conversation as resolved.
Outdated

## Native AOT publishing

Expand Down
Loading