From 0b1560295fd874dddf0097d862366c6d960ae39f Mon Sep 17 00:00:00 2001 From: Juan Diego Herrera Date: Wed, 18 Jan 2023 14:57:38 -0800 Subject: [PATCH] Prevent mobile and lib templates from opening editors if in VS With the Maui overview page in the editor, it doesn't quite make sense to have the other documents open on project creation. --- .../src/templates/maui-lib/.template.config/template.json | 2 +- .../src/templates/maui-mobile/.template.config/template.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Templates/src/templates/maui-lib/.template.config/template.json b/src/Templates/src/templates/maui-lib/.template.config/template.json index 7f0d8793c66b..afdb45c02a52 100644 --- a/src/Templates/src/templates/maui-lib/.template.config/template.json +++ b/src/Templates/src/templates/maui-lib/.template.config/template.json @@ -23,7 +23,7 @@ "postActions": [ { "id": "openInEditor", - "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\" && HostIdentifier != \"vs\")", "description": "Opens Class1.cs in the editor.", "manualInstructions": [], "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", diff --git a/src/Templates/src/templates/maui-mobile/.template.config/template.json b/src/Templates/src/templates/maui-mobile/.template.config/template.json index cc0ccc0e591e..b30cb4236149 100644 --- a/src/Templates/src/templates/maui-mobile/.template.config/template.json +++ b/src/Templates/src/templates/maui-mobile/.template.config/template.json @@ -26,7 +26,7 @@ "postActions": [ { "id": "openInEditor", - "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\" && HostIdentifier != \"vs\")", "description": "Opens MainPage.xaml in the editor.", "manualInstructions": [], "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",