diff --git a/src/ProjectTemplates/Shared/Project.cs b/src/ProjectTemplates/Shared/Project.cs index 1706366af32d..0fe3631e5695 100644 --- a/src/ProjectTemplates/Shared/Project.cs +++ b/src/ProjectTemplates/Shared/Project.cs @@ -466,7 +466,7 @@ private void CaptureBinLogOnFailure(ProcessEx result) if (result.ExitCode != 0 && !string.IsNullOrEmpty(ArtifactsLogDir)) { var sourceFile = Path.Combine(TemplateOutputDir, "msbuild.binlog"); - Assert.True(File.Exists(sourceFile), $"Log for '{ProjectName}' not found in '{sourceFile}'."); + Assert.True(File.Exists(sourceFile), $"Log for '{ProjectName}' not found in '{sourceFile}'. Execution output: {result.Output}"); var destination = Path.Combine(ArtifactsLogDir, ProjectName + ".binlog"); File.Move(sourceFile, destination, overwrite: true); // binlog will exist on retries } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/EmptyBlazorServerWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/EmptyBlazorServerWeb-CSharp.csproj.in new file mode 100644 index 000000000000..d3a39c650379 --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/EmptyBlazorServerWeb-CSharp.csproj.in @@ -0,0 +1,11 @@ + + + + ${DefaultNetCoreTargetFramework} + enable + enable + True + EmptyBlazorServerWeb_CSharp + + + diff --git a/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj b/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj index 2dc413643421..ceae5ca94720 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj +++ b/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj @@ -56,6 +56,7 @@ + diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/dotnetcli.host.json new file mode 100644 index 000000000000..d97858472b80 --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/dotnetcli.host.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "Framework": { + "longName": "framework" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + }, + "kestrelHttpPort": { + "isHidden": true + }, + "kestrelHttpsPort": { + "isHidden": true + }, + "iisHttpPort": { + "isHidden": true + }, + "iisHttpsPort": { + "isHidden": true + }, + "ExcludeLaunchSettings": { + "longName": "exclude-launch-settings", + "shortName": "" + }, + "NoHttps": { + "longName": "no-https", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/ide.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/ide.host.json new file mode 100644 index 000000000000..278a9a31ca51 --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/ide.host.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json.schemastore.org/ide.host", + "order": 650, + "icon": "ide/icon.png", + "disableHttpsSymbol": "NoHttps", + "supportsDocker": true, + "tags": [ + { + "type": "projectType", + "add": [ "Cloud", "Web" ], + "remove": [ "*" ] + }, + { + "type": "platform", + "add": [ "Linux", "macOS", "Windows" ] + } + ] +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/ide/icon.png b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/ide/icon.png new file mode 100644 index 000000000000..8422b5969593 Binary files /dev/null and b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/ide/icon.png differ diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.cs.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.de.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.en.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.es.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.fr.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.it.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ja.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ko.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.pl.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.pt-BR.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ru.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.tr.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..640cc3e5508d --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,16 @@ +{ + "author": "Microsoft", + "name": "Blazor Server App Empty", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.", + "symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.", + "symbols/kestrelHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.", + "symbols/iisHttpsPort/description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used.", + "symbols/NoHttps/description": "Whether to turn off HTTPS.", + "symbols/Framework/description": "The target framework for the project.", + "symbols/Framework/choices/net7.0/description": "Target net7.0", + "symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.", + "postActions/restore/description": "Restore NuGet packages required by this project.", + "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/template.json new file mode 100644 index 000000000000..577fe646331f --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/.template.config/template.json @@ -0,0 +1,198 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ + "Web", + "Blazor", + "Empty" + ], + "name": "Blazor Server App Empty", + "generatorVersions": "[1.0.0.0-*)", + "description": "An empty project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template does not have any content in it.", + "groupIdentity": "Microsoft.Web.Blazor.Server.Empty", + "precedence": "9000", + "identity": "Microsoft.Web.Blazor.Server.Empty.CSharp.7.0", + "shortName": "blazorserver-empty", + "thirdPartyNotices": "https://aka.ms/aspnetcore/7.0-third-party-notices", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "EmptyBlazorServerWeb-CSharp", + "preferNameDirectory": true, + "sources": [ + { + "source": "./", + "target": "./", + "exclude": [ + ".template.config/**" + ], + "copyOnly": [ + "wwwroot/**" + ], + "modifiers": [ + { + "condition": "(ExcludeLaunchSettings)", + "exclude": [ + "Properties/launchSettings.json" + ] + } + ] + } + ], + "symbols": { + "ExcludeLaunchSettings": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether to exclude launchSettings.json from the generated template." + }, + "kestrelHttpPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the HTTP endpoint in launchSettings.json." + }, + "kestrelHttpPortGenerated": { + "type": "generated", + "generator": "port", + "parameters": { + "low": 5000, + "high": 5300 + } + }, + "kestrelHttpPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "kestrelHttpPort", + "fallbackVariableName": "kestrelHttpPortGenerated" + }, + "replaces": "5000" + }, + "kestrelHttpsPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used." + }, + "kestrelHttpsPortGenerated": { + "type": "generated", + "generator": "port", + "parameters": { + "low": 7000, + "high": 7300 + } + }, + "kestrelHttpsPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "kestrelHttpsPort", + "fallbackVariableName": "kestrelHttpsPortGenerated" + }, + "replaces": "5001" + }, + "iisHttpPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json." + }, + "iisHttpPortGenerated": { + "type": "generated", + "generator": "port" + }, + "iisHttpPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "iisHttpPort", + "fallbackVariableName": "iisHttpPortGenerated" + }, + "replaces": "8080" + }, + "iisHttpsPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used." + }, + "iisHttpsPortGenerated": { + "type": "generated", + "generator": "port", + "parameters": { + "low": 44300, + "high": 44399 + } + }, + "iisHttpsPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "iisHttpsPort", + "fallbackVariableName": "iisHttpsPortGenerated" + }, + "replaces": "44300" + }, + "HasHttpProfile": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "true", + "description": "Always have HTTP profile." + }, + "HasHttpsProfile": { + "type": "computed", + "value": "(!NoHttps)" + }, + "NoHttps": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether to turn off HTTPS." + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "datatype": "choice", + "choices": [ + { + "choice": "net7.0", + "description": "Target net7.0" + } + ], + "replaces": "net7.0", + "defaultValue": "net7.0" + }, + "copyrightYear": { + "type": "generated", + "generator": "now", + "replaces": "copyrightYear", + "parameters": { + "format": "yyyy" + } + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "defaultValue": "false" + } + }, + "primaryOutputs": [ + { + "path": "EmptyBlazorServerWeb-CSharp.csproj" + } + ], + "defaultName": "EmptyBlazorApp", + "postActions": [ + { + "id": "restore", + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [ + { + "text": "Run 'dotnet restore'" + } + ], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "continueOnError": true + } + ] +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/App.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/App.razor new file mode 100644 index 000000000000..6fd3ed1b5a3b --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/App.razor @@ -0,0 +1,12 @@ + + + + + + + Not found + +

Sorry, there's nothing at this address.

+
+
+
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/MainLayout.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/MainLayout.razor new file mode 100644 index 000000000000..a5af3489ae82 --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/MainLayout.razor @@ -0,0 +1,3 @@ +@inherits LayoutComponentBase + +
@Body
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Pages/Index.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Pages/Index.razor new file mode 100644 index 000000000000..cba3252e00cd --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Pages/Index.razor @@ -0,0 +1,3 @@ +@page "/" + +

Hello, world!

diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Pages/_Host.cshtml b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Pages/_Host.cshtml new file mode 100644 index 000000000000..5dd2752eea7f --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Pages/_Host.cshtml @@ -0,0 +1,30 @@ +@page "/" +@using Microsoft.AspNetCore.Components.Web +@namespace EmptyBlazorServerWeb_CSharp.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers + + + + + + + + + + + + +
+ + An error has occurred. This application may no longer respond until reloaded. + + + An unhandled exception has occurred. See browser dev tools for details. + + Reload + 🗙 +
+ + + + diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Program.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Program.cs new file mode 100644 index 000000000000..a03e57e09dc4 --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Program.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Web; + +var builder = WebApplication.CreateBuilder(args); +builder.Services.AddRazorPages(); +builder.Services.AddServerSideBlazor(); + +var app = builder.Build(); + +#if (HasHttpsProfile) +if (!app.Environment.IsDevelopment()) +{ + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +#endif + +app.UseStaticFiles(); + +app.UseRouting(); + +app.MapBlazorHub(); +app.MapFallbackToPage("/_Host"); + +app.Run(); diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Properties/launchSettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Properties/launchSettings.json new file mode 100644 index 000000000000..fad0d512b6fc --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/Properties/launchSettings.json @@ -0,0 +1,43 @@ +{ + "iisSettings": { + "iisExpress": { + "applicationUrl": "http://localhost:8080", + //#if (HasHttpsProfile) + "sslPort": 44300 + //#else + "sslPort": 0 + //#endif + } + }, + "profiles": { + //#if(HasHttpProfile) + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + //#endif + //#if(HasHttpsProfile) + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + //#endif + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/_Imports.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/_Imports.razor new file mode 100644 index 000000000000..73a335442d94 --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/_Imports.razor @@ -0,0 +1,4 @@ +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.JSInterop +@using EmptyBlazorServerWeb_CSharp diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/appsettings.Development.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/appsettings.Development.json new file mode 100644 index 000000000000..770d3e93146b --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/appsettings.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/appsettings.json new file mode 100644 index 000000000000..10f68b8c8b4f --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/wwwroot/css/site.css b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/wwwroot/css/site.css new file mode 100644 index 000000000000..08e7f0bec960 --- /dev/null +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorServerWeb-CSharp/wwwroot/css/site.css @@ -0,0 +1,28 @@ +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 3.5rem; + top: 0.5rem; + } + +.blazor-error-boundary { + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; + padding: 1rem 1rem 1rem 3.7rem; + color: white; +} + + .blazor-error-boundary::after { + content: "An error has occurred." + } diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/EmptyBlazorServerTemplateTest.cs b/src/ProjectTemplates/test/Templates.Blazor.Tests/EmptyBlazorServerTemplateTest.cs new file mode 100644 index 000000000000..7886d95a0399 --- /dev/null +++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/EmptyBlazorServerTemplateTest.cs @@ -0,0 +1,31 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Testing; +using Templates.Test.Helpers; +using Xunit; +using Xunit.Abstractions; +using Xunit.Sdk; + +namespace Templates.Blazor.Test; + +public class EmptyBlazorServerTemplateTest : BlazorTemplateTest +{ + public EmptyBlazorServerTemplateTest(ProjectFactoryFixture projectFactory) + : base(projectFactory) + { + } + + public override string ProjectType { get; } = "blazorserver-empty"; + + [Fact] + public Task EmptyBlazorServerTemplateWorks() => CreateBuildPublishAsync(); + + [Fact] + public Task EmptyBlazorServerTemplate_NoHttps_Works() => CreateBuildPublishAsync(args: new[] { ArgConstants.NoHttps }); +} diff --git a/src/ProjectTemplates/test/Templates.Tests/template-baselines.json b/src/ProjectTemplates/test/Templates.Tests/template-baselines.json index f2a584d6fd13..cfd966f614f4 100644 --- a/src/ProjectTemplates/test/Templates.Tests/template-baselines.json +++ b/src/ProjectTemplates/test/Templates.Tests/template-baselines.json @@ -1500,6 +1500,37 @@ "wwwroot/css/open-iconic/font/fonts/open-iconic.woff" ] }, + "Empty": { + "Template": "blazorserver-empty", + "Arguments": "new blazorserver-empty", + "Files": [ + "App.razor", + "appsettings.Development.json", + "appsettings.json", + "MainLayout.razor", + "Program.cs", + "_Imports.razor", + "Pages/Index.razor", + "Pages/_Host.cshtml", + "Properties/launchSettings.json", + "wwwroot/css/site.css" + ] + }, + "EmptyExcludeLaunchSettings": { + "Template": "blazorserver-empty", + "Arguments": "new blazorserver-empty --exclude-launch-settings", + "Files": [ + "App.razor", + "appsettings.Development.json", + "appsettings.json", + "MainLayout.razor", + "Program.cs", + "_Imports.razor", + "Pages/Index.razor", + "Pages/_Host.cshtml", + "wwwroot/css/site.css" + ] + }, "SingleOrg": { "Template": "blazorserver", "Arguments": "new blazorserver -au SingleOrg",