Skip to content

Empty Blazor Server Project Template #42079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6794f66
Duplicated Blazor WebAssembly and Blazor Hosted templates
cerasamson Jun 2, 2022
074eff7
Renaming to reflect file name change
cerasamson Jun 2, 2022
8a46db2
Added files for empty Blazor Server template
cerasamson Jun 7, 2022
d9767a1
Delete Empty WASM Template files
cerasamson Jun 7, 2022
1144845
Create EmptyBlazorServerWeb-CSharp.csproj.in
cerasamson Jun 7, 2022
f179518
Update launchSettings.json
cerasamson Jun 7, 2022
bf6984b
Update site.css
cerasamson Jun 7, 2022
167f0c8
Removed GUIDs, "Shared" folder, Program.Main.cs
cerasamson Jun 8, 2022
b25f3f0
Update src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorS…
cerasamson Jun 8, 2022
532d4d6
Removed references to Program.Main.cs, reverted HTTPS settings
cerasamson Jun 8, 2022
0ddda00
Merge branch 't-samsoncera/empty_template' of https://github.com/cera…
cerasamson Jun 8, 2022
59e7d18
Update src/ProjectTemplates/Web.ProjectTemplates/content/EmptyBlazorS…
cerasamson Jun 8, 2022
2e100cf
Added EmptyBlazorServerTest; fixed dismiss formatting
cerasamson Jun 10, 2022
8ad2bba
Added blazorserver-empty to template-baselines.json
cerasamson Jun 10, 2022
eeac1a3
Remove ProgramMain; name changes
cerasamson Jun 13, 2022
8858463
Moved folders for empty template
cerasamson Jun 13, 2022
f743db0
Revert this (testing CI)
cerasamson Jun 14, 2022
808fc09
Assert failure logging for missing binlog
TanayParikh Jun 14, 2022
1943667
Update Project.cs
TanayParikh Jun 14, 2022
db2bb69
Update Project.cs
TanayParikh Jun 15, 2022
1cda572
Merge branch 'main' into t-samsoncera/empty_template
cerasamson Jun 15, 2022
db608a5
Merge branch 'main' into t-samsoncera/empty_template
cerasamson Jun 16, 2022
7caf4f5
Update MainLayout.razor, Index.razor
cerasamson Jun 16, 2022
da5bcc2
Moved empty template test, changed namesapce
cerasamson Jun 16, 2022
9e1da5a
Modify to reflect changes in http/https launch profiles
cerasamson Jun 17, 2022
cecfa72
Merge branch 'main' into t-samsoncera/empty_template
cerasamson Jun 17, 2022
ceefab2
Remove RequiresHttps from template.json
cerasamson Jun 17, 2022
354f703
Update EmptyBlazorServerTemplateTest.cs
cerasamson Jun 17, 2022
74af016
Merge branch 'main' into t-samsoncera/empty_template
cerasamson Jun 20, 2022
8d966d3
Update src/ProjectTemplates/Shared/Project.cs
cerasamson Jun 20, 2022
1969efa
Update Microsoft.DotNet.Web.ProjectTemplates.csproj
cerasamson Jun 20, 2022
7b087fe
Merge branch 't-samsoncera/empty_template' of https://github.com/cera…
cerasamson Jun 20, 2022
45e0e54
Merge branch 'dotnet:main' into t-samsoncera/empty_template
cerasamson Jun 20, 2022
6d421b4
Update template.json
cerasamson Jun 20, 2022
9ae1b94
Add exclude-launch-settings test
cerasamson Jun 20, 2022
a647db9
Merge branch 'dotnet:main' into t-samsoncera/empty_template
cerasamson Jun 21, 2022
fbc7b9d
Modified .json files
cerasamson Jun 21, 2022
415faa7
Move tags to ide.host.json
cerasamson Jun 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ProjectTemplates/Shared/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>${DefaultNetCoreTargetFramework}</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">EmptyBlazorServerWeb_CSharp</RootNamespace>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<GeneratedContent Include="EmptyWeb-FSharp.fsproj.in" OutputPath="content/EmptyWeb-FSharp/Company.WebApplication1.fsproj" />
<GeneratedContent Include="GrpcService-CSharp.csproj.in" OutputPath="content/GrpcService-CSharp/GrpcService-CSharp.csproj" />
<GeneratedContent Include="BlazorServerWeb-CSharp.csproj.in" OutputPath="content/BlazorServerWeb-CSharp/BlazorServerWeb-CSharp.csproj" />
<GeneratedContent Include="EmptyBlazorServerWeb-CSharp.csproj.in" OutputPath="content/EmptyBlazorServerWeb-CSharp/EmptyBlazorServerWeb-CSharp.csproj" />
<GeneratedContent Include="RazorPagesWeb-CSharp.csproj.in" OutputPath="content/RazorPagesWeb-CSharp/Company.WebApplication1.csproj" />
<GeneratedContent Include="RazorClassLibrary-CSharp.csproj.in" OutputPath="content/RazorClassLibrary-CSharp/Company.RazorClassLibrary1.csproj" />
<GeneratedContent Include="StarterWeb-CSharp.csproj.in" OutputPath="content/StarterWeb-CSharp/Company.WebApplication1.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -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": [
""
]
}
Original file line number Diff line number Diff line change
@@ -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" ]
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Original file line number Diff line number Diff line change
@@ -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'"
}
Loading