From ac901d366e4976da4208aa2ad9c65442b661718d Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 25 Sep 2025 14:46:46 +0200 Subject: [PATCH] Document new options of json post action Added support for new options in .NET 10 SDK regarding JSON file handling. --- docs/Post-Action-Registry.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/Post-Action-Registry.md b/docs/Post-Action-Registry.md index ad5cab1160b..370739e931d 100644 --- a/docs/Post-Action-Registry.md +++ b/docs/Post-Action-Registry.md @@ -468,6 +468,10 @@ Adds a new JSON property in an existing JSON file. - `parentPropertyPath (string)` (optional): Specifies an existing property in the JSON file for which the new property must be a child property. The complete path must be specified, using a colon (:) as a separator character, for instance, `Person:Address`. If parentPropertyPath is not defined, the new property will be added to the root of the JSON document. - `newJsonPropertyName (string)`: The name that must be given to the new property. - `newJsonPropertyValue (string)`: The value that must be assigned to the new property. This must be a valid JSON. + - Starting in .NET 10 SDK, the following are also supported: + - `detectRepositoryRoot (bool)`: Whether or not a detection logic to find repo root is enabled. When the JSON file is not found, it will be created in the detected repo root if this option is true. Also when searching for an existing JSON file, the search will stop at the repo root and won't consider any parent directories. The default is `false`. + - `includeAllDirectoriesInSearch (bool)`: Whether or not sub-directories are searched for a matching json file (i.e, use `SearchOption.AllDirectories`). The default is `true`. + - `includeAllParentDirectories (bool)`: Whether or not all parent directories (up to repo root, if `detectRepositoryRoot` is true) are searched for a matching JSON file. When `false`, only one level up is searched. The default is `false`. - **Supported in** : - dotnet new3 - dotnet new (2.0.0 or higher)