Skip to content
17 changes: 15 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,20 @@ 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 are: `#:include`, `#:package`, `#:project`, `#:property`, and `#:sdk`. Place these directives at the top of the C# file.

### `#:include`

Includes another C# source file in the file-based app.

Included files compile as part of the same app. They can add types, top-level statements, and other declarations.

```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.
Comment thread
adegeo marked this conversation as resolved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should wait for this to actually land in 3xx. It might not, you never know.

Do you think it's a good idea to put this up front? Someone may get here, try it, find it not working, never see that paragraph and complain it doesn't work.


### `#:package`

Expand Down
Loading