From bccf72b75fd361c3b9b6f7cb71c9740e52cb0987 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Mon, 25 Aug 2025 16:45:20 +0200 Subject: [PATCH 1/2] Update documentation for #:sdk directive Clarified the explanation of the #:sdk directive and its usage, including the handling of version specification. --- .../csharp/language-reference/preprocessor-directives.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/preprocessor-directives.md b/docs/csharp/language-reference/preprocessor-directives.md index ec1d766d85caa..1a8998b036501 100644 --- a/docs/csharp/language-reference/preprocessor-directives.md +++ b/docs/csharp/language-reference/preprocessor-directives.md @@ -66,10 +66,17 @@ The `#:` directives that are used in file-based apps include: - `#:sdk`: - The first instance specifies the value for the `` node. Subsequent instances specify the `` node. The version can be omitted. For example: + The first instance specifies the value for the `` node. Subsequent instances specify the `` node. The version can be omitted (i.e. if specified in global.json or included in .NET SDK). For example: ```csharp #:sdk Microsoft.NET.Sdk.Web + #:sdk Aspire.AppHost.Sdk@9.4.1 + ``` + + The two preceding preprocessors is translated into: + ```xml + + ``` - `#:property`: From b0387430d2a8a80ade32933c43b9185667afb12e Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Mon, 25 Aug 2025 11:44:48 -0400 Subject: [PATCH 2/2] Update docs/csharp/language-reference/preprocessor-directives.md --- docs/csharp/language-reference/preprocessor-directives.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/csharp/language-reference/preprocessor-directives.md b/docs/csharp/language-reference/preprocessor-directives.md index 1a8998b036501..930ab1fadc953 100644 --- a/docs/csharp/language-reference/preprocessor-directives.md +++ b/docs/csharp/language-reference/preprocessor-directives.md @@ -74,6 +74,7 @@ The `#:` directives that are used in file-based apps include: ``` The two preceding preprocessors is translated into: + ```xml