diff --git a/docs/csharp/language-reference/preprocessor-directives.md b/docs/csharp/language-reference/preprocessor-directives.md index 930ab1fadc953..d93158c7ce056 100644 --- a/docs/csharp/language-reference/preprocessor-directives.md +++ b/docs/csharp/language-reference/preprocessor-directives.md @@ -1,7 +1,7 @@ --- description: "Learn the different C# preprocessor directives that control conditional compilation, warnings, nullable analysis, and more" title: "Preprocessor directives" -ms.date: 06/19/2025 +ms.date: 09/24/2025 f1_keywords: - "cs.preprocessor" - "#nullable" @@ -109,6 +109,20 @@ The `#:` directives that are used in file-based apps include: ```xml ``` + +- `#:project`: + + Instances of `#:project` are translated into `ProjectReference` elements to include the project with the specified path to the project. For example: + + ```csharp + #:project ../Path/To.Example.csproj + ``` + + The preceding preprocessor token is translated into: + + ```xml + + ``` Tools can add new tokens following the `#:` convention.