diff --git a/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/aspirecli.host.json b/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/aspirecli.host.json index 5fcacd02c08..6a9410d80a9 100644 --- a/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/aspirecli.host.json +++ b/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/aspirecli.host.json @@ -2,6 +2,7 @@ "createNuGetConfig": true, "symbolInfo": { "Framework": { "isHidden": true }, + "HostIdentifier": { "isHidden": true }, "AspireVersion": { "isHidden": true }, "appHostHttpPort": { "isHidden": true }, "appHostHttpsPort": { "isHidden": true }, diff --git a/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/dotnetcli.host.json b/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/dotnetcli.host.json index caa3fe664a3..786eddca69e 100644 --- a/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/dotnetcli.host.json +++ b/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/dotnetcli.host.json @@ -7,6 +7,9 @@ "AspireVersion": { "isHidden": true }, + "HostIdentifier": { + "isHidden": true + }, "skipRestore": { "longName": "no-restore", "shortName": "" diff --git a/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/ide.host.json b/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/ide.host.json index 0f1707f5861..0771dc1fa97 100644 --- a/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/ide.host.json +++ b/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/ide.host.json @@ -8,6 +8,10 @@ "id": "AspireVersion", "isVisible": false }, + { + "id": "HostIdentifier", + "isVisible": false + }, { "id": "LocalhostTld", "isVisible": true, diff --git a/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/template.json b/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/template.json index 804d9daf0df..b5fc8550fe5 100644 --- a/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/template.json +++ b/src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/template.json @@ -66,12 +66,24 @@ "replaces": "net10.0", "defaultValue": "net10.0" }, + "HostIdentifier": { + "type": "parameter", + "datatype": "string" + }, "AspireVersion": { "type": "parameter", "description": "The version of Aspire to use.", "displayName": "Aspire version", - "datatype": "string", - "defaultValue": "!!REPLACE_WITH_LATEST_MAJOR_MINOR_VERSION!!" + "datatype": "choice", + "choices": [ + { + "choice": "!!REPLACE_WITH_LATEST_MAJOR_MINOR_VERSION!!", + "displayName": "!!REPLACE_WITH_LATEST_MAJOR_MINOR_VERSION!!", + "description": "Chooses Aspire !!REPLACE_WITH_LATEST_MAJOR_MINOR_VERSION!!" + } + ], + "defaultValue": "!!REPLACE_WITH_LATEST_MAJOR_MINOR_VERSION!!", + "isEnabled": "(HostIdentifier != \"aspirecli\")" }, "hostIdentifier": { "type": "bind",