diff --git a/docs/core/sdk/file-based-apps.md b/docs/core/sdk/file-based-apps.md index 0ff2a73c00b4f..69c54fb3d3e55 100644 --- a/docs/core/sdk/file-based-apps.md +++ b/docs/core/sdk/file-based-apps.md @@ -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 @@ -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. ### `#:package`