From 969b8b86a6ec475850074bd010073ad236fc45df Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 5 Mar 2018 15:56:11 -0800 Subject: [PATCH] Make templates show up in the One ASP.NET dialog (#208) * Add templates parameter * Fix primary outputs * Reorder primary outputs * Update hosted template name * Fix whitespace --- .../.template.config/dotnetcli.host.json | 3 ++ .../.template.config/template.json | 38 +++++++++++++++++++ .../.template.config/vs-2017.3.host.json | 2 +- .../.template.config/dotnetcli.host.json | 3 ++ .../.template.config/template.json | 13 +++++++ 5 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/dotnetcli.host.json b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/dotnetcli.host.json index 2c293632c0..11797289ab 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/dotnetcli.host.json +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/dotnetcli.host.json @@ -4,6 +4,9 @@ "skipRestore": { "longName": "no-restore", "shortName": "" + }, + "Framework": { + "longName": "framework" } } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/template.json b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/template.json index 1d4a2bea4e..d27225c05c 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/template.json +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/template.json @@ -17,7 +17,32 @@ "preferNameDirectory": true, "primaryOutputs": [ { + "condition": "(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\")", "path": "BlazorHosted.CSharp.sln" + }, + { + "condition": "(OS == \"Windows_NT\" && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "BlazorHosted.CSharp.Server\\BlazorHosted.CSharp.Server.csproj" + }, + { + "condition": "(OS != \"Windows_NT\" && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "BlazorHosted.CSharp.Server/BlazorHosted.CSharp.Server.csproj" + }, + { + "condition": "(OS == \"Windows_NT\" && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "BlazorHosted.CSharp.Client\\BlazorHosted.CSharp.Client.csproj" + }, + { + "condition": "(OS != \"Windows_NT\" && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "BlazorHosted.CSharp.Client/BlazorHosted.CSharp.Client.csproj" + }, + { + "condition": "(OS == \"Windows_NT\" && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "BlazorHosted.CSharp.Shared\\BlazorHosted.CSharp.Shared.csproj" + }, + { + "condition": "(OS != \"Windows_NT\" && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "BlazorHosted.CSharp.Shared/BlazorHosted.CSharp.Shared.csproj" } ], "shortName": "blazorhosted", @@ -32,6 +57,19 @@ } ], "symbols": { + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "datatype": "choice", + "choices": [ + { + "choice": "netcoreapp2.0", + "description": "Target netcoreapp2.0" + } + ], + "replaces": "netcoreapp2.0", + "defaultValue": "netcoreapp2.0" + }, "HostIdentifier": { "type": "bind", "binding": "HostIdentifier" diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/vs-2017.3.host.json b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/vs-2017.3.host.json index 9c7ed77d1c..f9df41d118 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/vs-2017.3.host.json +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/.template.config/vs-2017.3.host.json @@ -1,7 +1,7 @@ { "$schema": "http://json.schemastore.org/vs-2017.3.host", "name": { - "text": "Blazor, hosted in a ASP.NET Web Application", + "text": "Blazor (ASP.NET Core hosted)", "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", "id": "1050" }, diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/.template.config/dotnetcli.host.json b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/.template.config/dotnetcli.host.json index 2c293632c0..11797289ab 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/.template.config/dotnetcli.host.json +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/.template.config/dotnetcli.host.json @@ -4,6 +4,9 @@ "skipRestore": { "longName": "no-restore", "shortName": "" + }, + "Framework": { + "longName": "framework" } } } \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/.template.config/template.json b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/.template.config/template.json index f6978eb68c..597843e00b 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/.template.config/template.json +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/.template.config/template.json @@ -26,6 +26,19 @@ } ], "symbols": { + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "datatype": "choice", + "choices": [ + { + "choice": "netcoreapp2.0", + "description": "Target netcoreapp2.0" + } + ], + "replaces": "netcoreapp2.0", + "defaultValue": "netcoreapp2.0" + }, "HostIdentifier": { "type": "bind", "binding": "HostIdentifier"