├── .assets
├── PNG to SVG - FreeConvert.com.url
├── fig-001.png
├── fig-002.png
├── nupkg-icon.docx
├── nupkg-icon.png
├── rev.2
│ ├── fig-001.png
│ ├── fig-002.png
│ ├── fig-003.png
│ └── fig-004.png
├── rev.3
│ ├── fig-003.png
│ └── fig-004.png
└── rev.4
│ └── fig-002.png
├── .editorconfig
├── .gitignore
├── .vscode
└── tasks.json
├── Content
├── .vscode
│ └── settings.json
├── BlazorMIn
│ ├── .template.config
│ │ ├── dotnetcli.host.json
│ │ ├── icon.png
│ │ ├── ide.host.json
│ │ ├── ja-JP
│ │ │ └── strings.json
│ │ └── template.json
│ ├── .vscode
│ │ └── settings.json
│ ├── BlazorMin.Client
│ │ ├── BlazorMin.Client.csproj
│ │ ├── Layout
│ │ │ └── MainLayout.razor
│ │ ├── LayoutRoot.razor
│ │ ├── Pages
│ │ │ ├── Home.razor
│ │ │ └── Home.razor.css
│ │ ├── Program.cs
│ │ ├── Routes.razor
│ │ ├── _Imports.razor
│ │ └── wwwroot
│ │ │ ├── appsettings.Development.json
│ │ │ └── appsettings.json
│ ├── BlazorMin.sln
│ └── BlazorMin
│ │ ├── BlazorMin.csproj
│ │ ├── BlazorMin.sln
│ │ ├── Components
│ │ ├── App.razor
│ │ ├── Layout
│ │ │ └── MainLayout.razor
│ │ ├── LayoutRoot.razor
│ │ ├── Pages
│ │ │ ├── Home.razor
│ │ │ └── Home.razor.css
│ │ ├── Routes.razor
│ │ └── _Imports.razor
│ │ ├── Program.cs
│ │ ├── Properties
│ │ └── launchSettings.json
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ └── wwwroot
│ │ ├── css
│ │ └── blazor-ui.css
│ │ └── favicon.ico
├── BlazorServerMin
│ ├── .template.config
│ │ ├── dotnetcli.host.json
│ │ ├── icon.png
│ │ ├── ide.host.json
│ │ ├── ja-JP
│ │ │ └── strings.json
│ │ └── template.json
│ ├── App.NoRouting.razor
│ ├── App.Routing.razor
│ ├── App.razor.css
│ ├── BlazorServerMin.csproj
│ ├── BlazorServerMin.sln
│ ├── Pages
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ ├── _Host.Net6.cshtml
│ │ ├── _Host.Net7.cshtml
│ │ └── _Layout.Net6.cshtml
│ ├── Program.cs
│ ├── Properties
│ │ └── launchSettings.json
│ ├── Shared
│ │ └── MainLayout.razor
│ ├── _Imports.razor
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ └── wwwroot
│ │ ├── css
│ │ └── blazor-ui.css
│ │ └── favicon.ico
└── BlazorWasmMin
│ ├── .template.config
│ ├── dotnetcli.host.json
│ ├── icon.png
│ ├── ide.host.json
│ ├── ja-JP
│ │ └── strings.json
│ └── template.json
│ ├── BlazorWasmMin.sln
│ ├── Client
│ ├── App.NoRouting.razor
│ ├── App.Routing.razor
│ ├── App.razor.css
│ ├── BlazorWasmMin.Client.csproj
│ ├── BlazorWasmMin.Client.sln
│ ├── Pages
│ │ └── _._
│ ├── Program.cs
│ ├── Properties
│ │ └── launchSettings.json
│ ├── Shared
│ │ └── MainLayout.razor
│ ├── _Imports.razor
│ └── wwwroot
│ │ ├── css
│ │ └── blazor-ui.css
│ │ ├── favicon.ico
│ │ └── index.html
│ ├── Server
│ ├── BlazorWasmMin.Server.csproj
│ ├── Pages
│ │ ├── Error.cshtml
│ │ └── Error.cshtml.cs
│ ├── Program.cs
│ ├── Properties
│ │ └── launchSettings.json
│ ├── appsettings.Development.json
│ └── appsettings.json
│ └── Shared
│ ├── BlazorWasmMin.Shared.csproj
│ └── Class1.cs
├── LICENSE
├── README.md
├── RELEASE-NOTES.txt
├── THIRD-PARTY-NOTICES.txt
├── Toolbelt.AspNetCore.Blazor.Minimum.Templates.csproj
├── Version.props
├── dist
└── .gitkeep
└── test
├── Blazor.Minimum.Templates.Test.csproj
├── Blazor.Minimum.Templates.Test.sln
├── BlazorMinTests.cs
├── BlazorServerMinTests.cs
├── BlazorWasmMinTests.cs
├── Internals
├── InteractiveMode.cs
├── LayoutOptions.cs
├── RoutingOptions.cs
└── TargetFramework.cs
├── TestSetup.cs
└── VersionInfo.cs
/.assets/PNG to SVG - FreeConvert.com.url:
--------------------------------------------------------------------------------
1 | [InternetShortcut]
2 | URL=https://www.freeconvert.com/png-to-svg
3 |
--------------------------------------------------------------------------------
/.assets/fig-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/fig-001.png
--------------------------------------------------------------------------------
/.assets/fig-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/fig-002.png
--------------------------------------------------------------------------------
/.assets/nupkg-icon.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/nupkg-icon.docx
--------------------------------------------------------------------------------
/.assets/nupkg-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/nupkg-icon.png
--------------------------------------------------------------------------------
/.assets/rev.2/fig-001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/rev.2/fig-001.png
--------------------------------------------------------------------------------
/.assets/rev.2/fig-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/rev.2/fig-002.png
--------------------------------------------------------------------------------
/.assets/rev.2/fig-003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/rev.2/fig-003.png
--------------------------------------------------------------------------------
/.assets/rev.2/fig-004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/rev.2/fig-004.png
--------------------------------------------------------------------------------
/.assets/rev.3/fig-003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/rev.3/fig-003.png
--------------------------------------------------------------------------------
/.assets/rev.3/fig-004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/rev.3/fig-004.png
--------------------------------------------------------------------------------
/.assets/rev.4/fig-002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/.assets/rev.4/fig-002.png
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.json]
2 | indent_style = space
3 | indent_size = 2
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vs/
2 | dist/
3 | bin/
4 | obj/
5 | *.user
6 | *.suo
7 | .vscode/settings.json
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | // See https://go.microsoft.com/fwlink/?LinkId=733558
3 | // for the documentation about the tasks.json format
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "group": {
8 | "kind": "build",
9 | "isDefault": true,
10 | },
11 | "label": "build package",
12 | "type": "shell",
13 | "command": "dotnet",
14 | "args": [
15 | "pack"
16 | ],
17 | "presentation": {
18 | "reveal": "silent"
19 | },
20 | "problemMatcher": "$msCompile"
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/Content/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.formatOnSave": false
3 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/.template.config/dotnetcli.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/dotnetcli.host",
3 | "symbolInfo": {
4 | "skipRestore": {
5 | "longName": "no-restore"
6 | },
7 | "Framework": {
8 | "longName": "framework"
9 | },
10 | "NoHttps": {
11 | "longName": "no-https"
12 | },
13 | "Interactivity": {
14 | "longName": "interactivity",
15 | "shortName": "int"
16 | },
17 | "Routing": {
18 | "longName": "routing"
19 | },
20 | "Layout": {
21 | "longName": "layout"
22 | },
23 | "Solution": {
24 | "longName": "solution"
25 | },
26 | "kestrelHttpPort": {
27 | "isHidden": true
28 | },
29 | "kestrelHttpsPort": {
30 | "isHidden": true
31 | },
32 | "iisHttpPort": {
33 | "isHidden": true
34 | },
35 | "iisHttpsPort": {
36 | "isHidden": true
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/.template.config/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/Content/BlazorMIn/.template.config/icon.png
--------------------------------------------------------------------------------
/Content/BlazorMIn/.template.config/ide.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/vs-2017.3.host",
3 | "order": 900,
4 | "icon": "icon.png",
5 | "ports": [
6 | {
7 | "name": "HttpPort",
8 | "useHttps": false
9 | },
10 | {
11 | "name": "HttpsPort",
12 | "useHttps": true
13 | }
14 | ],
15 | "disableHttpsSymbol": "NoHttps",
16 | "symbolInfo": [
17 | {
18 | "id": "Interactivity",
19 | "isVisible": true,
20 | "persistenceScope": "templateGroup",
21 | "name": {
22 | "text": "_Interactive render mode"
23 | }
24 | },
25 | {
26 | "id": "Routing",
27 | "name": {
28 | "text": "Enable _routing"
29 | },
30 | "isVisible": true
31 | },
32 | {
33 | "id": "Layout",
34 | "name": {
35 | "text": "Enable shared _layout"
36 | },
37 | "isVisible": true
38 | }
39 | ]
40 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/.template.config/ja-JP/strings.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0.0",
3 | "strings": {
4 | "name": "Blazor Web アプリ (空)",
5 | "description": "js および css ライブラリを一切含まない、空の Blazor Web アプリを作成するためのプロジェクト テンプレート。",
6 | "parameter.UseServer.name": "対話型サーバー コンポーネントを使用する(_U)",
7 | "parameter.UseServer.description": "指定した場合、サーバー上でコンポーネントを対話的にレンダリングするようにプロジェクトを構成します。",
8 | "parameter.UseWebAssembly.name": "対話型 WebAssembly サーバー コンポーネントを使用する(_U)",
9 | "parameter.UseWebAssembly.description": "指定した場合、WebAssembly を使用してブラウザーでコンポーネントを対話的にレンダリングするようにプロジェクトを構成します。",
10 | "parameter.Routing.name": "ルーティングを有効化(_R)",
11 | "parameter.Layout.name": "共通レイアウトを有効化(_L)"
12 | }
13 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "J.Sakamoto",
4 | "classifications": [
5 | "Web",
6 | "Blazor",
7 | "Empty"
8 | ],
9 | "groupIdentity": "Toolbelt.Web.Blazor.Minimum",
10 | "identity": "Toolbelt.Web.Blazor.Minimum.CSharp.7.0",
11 | "precedence": "7000",
12 | "name": "Blazor Web App (minimum)",
13 | "shortName": "blazormin",
14 | "description": "A project template for creating a Blazor web app without any js and css libraries",
15 | "thirdPartyNotices": "https://github.com/jsakamoto/BlazorMinimumTemplates/blob/master/THIRD-PARTY-NOTICES.txt",
16 | "defaultName": "BlazorApp",
17 | "preferNameDirectory": true,
18 | "tags": {
19 | "language": "C#",
20 | "type": "project"
21 | },
22 | "symbols": {
23 | "HostIdentifier": {
24 | "type": "bind",
25 | "binding": "HostIdentifier"
26 | },
27 | "skipRestore": {
28 | "type": "parameter",
29 | "datatype": "bool",
30 | "description": "If specified, skips the automatic restore of the project on create.",
31 | "defaultValue": "false"
32 | },
33 | "Framework": {
34 | "type": "parameter",
35 | "description": "The target framework for the project.",
36 | "datatype": "choice",
37 | "choices": [
38 | {
39 | "choice": "net8.0",
40 | "description": "Target net80"
41 | },
42 | {
43 | "choice": "net9.0",
44 | "description": "Target net90"
45 | }
46 | ],
47 | "replaces": "net8.0",
48 | "defaultValue": "net8.0"
49 | },
50 | "kestrelHttpPort": {
51 | "type": "parameter",
52 | "datatype": "integer",
53 | "description": "Port number to use for the HTTP endpoint in launchSettings.json."
54 | },
55 | "kestrelHttpPortGenerated": {
56 | "type": "generated",
57 | "generator": "port",
58 | "parameters": {
59 | "low": 5000,
60 | "high": 5300
61 | }
62 | },
63 | "kestrelHttpPortReplacer": {
64 | "type": "generated",
65 | "generator": "coalesce",
66 | "parameters": {
67 | "sourceVariableName": "kestrelHttpPort",
68 | "fallbackVariableName": "kestrelHttpPortGenerated"
69 | },
70 | "replaces": "5000"
71 | },
72 | "kestrelHttpsPort": {
73 | "type": "parameter",
74 | "datatype": "integer",
75 | "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 (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
76 | },
77 | "kestrelHttpsPortGenerated": {
78 | "type": "generated",
79 | "generator": "port",
80 | "parameters": {
81 | "low": 7000,
82 | "high": 7300
83 | }
84 | },
85 | "kestrelHttpsPortReplacer": {
86 | "type": "generated",
87 | "generator": "coalesce",
88 | "parameters": {
89 | "sourceVariableName": "kestrelHttpsPort",
90 | "fallbackVariableName": "kestrelHttpsPortGenerated"
91 | },
92 | "replaces": "5001"
93 | },
94 | "iisHttpPort": {
95 | "type": "parameter",
96 | "datatype": "integer",
97 | "description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json."
98 | },
99 | "iisHttpPortGenerated": {
100 | "type": "generated",
101 | "generator": "port"
102 | },
103 | "iisHttpPortReplacer": {
104 | "type": "generated",
105 | "generator": "coalesce",
106 | "parameters": {
107 | "sourceVariableName": "iisHttpPort",
108 | "fallbackVariableName": "iisHttpPortGenerated"
109 | },
110 | "replaces": "8080"
111 | },
112 | "iisHttpsPort": {
113 | "type": "parameter",
114 | "datatype": "integer",
115 | "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 (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
116 | },
117 | "iisHttpsPortGenerated": {
118 | "type": "generated",
119 | "generator": "port",
120 | "parameters": {
121 | "low": 44300,
122 | "high": 44399
123 | }
124 | },
125 | "iisHttpsPortReplacer": {
126 | "type": "generated",
127 | "generator": "coalesce",
128 | "parameters": {
129 | "sourceVariableName": "iisHttpsPort",
130 | "fallbackVariableName": "iisHttpsPortGenerated"
131 | },
132 | "replaces": "44300"
133 | },
134 | "NoHttps": {
135 | "type": "parameter",
136 | "datatype": "bool",
137 | "defaultValue": "false",
138 | "description": "Whether to turn off HTTPS."
139 | },
140 | "Interactivity": {
141 | "displayName": "_Interactive render mode",
142 | "description": "Chooses which interactive render mode to use for interactive components",
143 | "type": "parameter",
144 | "datatype": "choice",
145 | "choices": [
146 | {
147 | "choice": "None",
148 | "description": "No interactivity (static server rendering only)"
149 | },
150 | {
151 | "choice": "Server",
152 | "description": "Runs on the server"
153 | },
154 | {
155 | "choice": "WebAssembly",
156 | "description": "Runs in the browser using WebAssembly"
157 | },
158 | {
159 | "choice": "Auto",
160 | "description": "Uses Server while downloading WebAssembly assets, then uses WebAssembly"
161 | }
162 | ],
163 | "defaultValue": "None"
164 | },
165 | "Routing": {
166 | "type": "parameter",
167 | "datatype": "bool",
168 | "defaultValue": "false",
169 | "description": "If specified, enables routing for the Blazor Web app."
170 | },
171 | "Layout": {
172 | "type": "parameter",
173 | "datatype": "bool",
174 | "defaultValue": "false",
175 | "description": "If specified, enables shared layout for the Blazor Web app."
176 | },
177 | "Solution": {
178 | "type": "parameter",
179 | "datatype": "bool",
180 | "defaultValue": "true",
181 | "description": "If specified, adds a solution file for the standalone Blazor Web app."
182 | }
183 | },
184 | "guids": [
185 | "A34DA4F5-B21D-4757-BD8B-A03D34D209E2",
186 | "B8D8DFFF-3971-4C1C-B6F0-0FDE31504D1B",
187 | "A8CCCF7D-37EC-490E-9DD6-3D4F180C33EE"
188 | ],
189 | "sourceName": "BlazorMin",
190 | "sources": [
191 | {
192 | "source": "./",
193 | "target": "./",
194 | "exclude": [
195 | ".template.config/**"
196 | ],
197 | "copyOnly": [
198 | "**/wwwroot/css/**"
199 | ],
200 | "modifiers": [
201 | {
202 | "condition": "(!Solution || (HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\"))",
203 | "exclude": [
204 | "BlazorMin.sln",
205 | "BlazorMin/BlazorMin.sln"
206 | ]
207 | },
208 | {
209 | "condition": "(Interactivity == \"WebAssembly\" || Interactivity == \"Auto\")",
210 | "exclude": [
211 | "BlazorMin/BlazorMin.sln"
212 | ]
213 | },
214 | {
215 | "condition": "Interactivity == \"None\"",
216 | "exclude": [
217 | "BlazorMin/wwwroot/css/blazor-ui.css"
218 | ]
219 | },
220 | {
221 | "condition": "(Interactivity == \"WebAssembly\" || Interactivity == \"Auto\")",
222 | "exclude": [
223 | "BlazorMin/Components/Pages/**"
224 | ]
225 | },
226 | {
227 | "condition": "(Interactivity == \"WebAssembly\" || Interactivity == \"Auto\" || !Layout)",
228 | "exclude": [
229 | "BlazorMin/Components/Layout/**"
230 | ]
231 | },
232 | {
233 | "condition": "(Interactivity == \"WebAssembly\" || Interactivity == \"Auto\" || !Routing)",
234 | "exclude": [
235 | "BlazorMin/Components/Routes.razor"
236 | ]
237 | },
238 | {
239 | "condition": "(Interactivity != \"Server\" || Routing || !Layout)",
240 | "exclude": [
241 | "BlazorMin/Components/LayoutRoot.razor"
242 | ]
243 | },
244 | {
245 | "condition": "(!Layout)",
246 | "exclude": [
247 | "BlazorMin.Client/Layout/**"
248 | ]
249 | },
250 | {
251 | "condition": "(!Routing)",
252 | "exclude": [
253 | "BlazorMin.Client/Routes.razor"
254 | ]
255 | },
256 | {
257 | "condition": "(Routing || !Layout)",
258 | "exclude": [
259 | "BlazorMin.Client/LayoutRoot.razor"
260 | ]
261 | },
262 | {
263 | "condition": "(Interactivity == \"None\" || Interactivity == \"Server\")",
264 | "exclude": [
265 | "BlazorMin.Client/**",
266 | "BlazorMin.sln"
267 | ],
268 | "rename": {
269 | "BlazorMin/": ""
270 | }
271 | }
272 | ]
273 | }
274 | ],
275 | "primaryOutputs": [
276 | {
277 | "condition": "(Interactivity == \"None\" || Interactivity == \"Server\")",
278 | "path": "BlazorMin.csproj"
279 | },
280 | {
281 | "condition": "(Interactivity == \"WebAssembly\" || Interactivity == \"Auto\")",
282 | "path": "BlazorMin/BlazorMin.csproj"
283 | },
284 | {
285 | "condition": "(Interactivity == \"WebAssembly\" || Interactivity == \"Auto\")",
286 | "path": "BlazorMin.Client/BlazorMin.Client.csproj"
287 | },
288 | {
289 | "condition": "(Solution && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
290 | "path": "BlazorMin.sln"
291 | }
292 | ],
293 | "postActions": [
294 | {
295 | "condition": "(!skipRestore)",
296 | "description": "Restore NuGet packages required by this project.",
297 | "manualInstructions": [
298 | {
299 | "text": "Run 'dotnet restore'"
300 | }
301 | ],
302 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
303 | "continueOnError": true
304 | }
305 | ]
306 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.formatOnSave": false
3 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/BlazorMin.Client.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0
5 | enable
6 | enable
7 | true
8 | Default
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/Layout/MainLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 | @Body
3 |
4 |
5 | An unhandled error has occurred.
6 |
Reload
7 |
🗙
8 |
9 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/LayoutRoot.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/Pages/Home.razor:
--------------------------------------------------------------------------------
1 | @*#if (Routing)
2 | @page "/"
3 |
4 | #endif*@
5 |
6 |
7 | Welcome to @Title!
8 |
9 |
11 |
12 | @System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription |
13 | @*#if (Framework == "net8.0")*@
14 | @System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture
15 | @*#else*@
16 | @this.RendererInfo.Name (@System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture)
17 | @*#endif*@
18 |
19 |
Here are some links to help you start:
20 |
21 |
22 |
23 |
24 |
25 | @code {
26 | string Title = "Blazor";
27 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/Pages/Home.razor.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/Content/BlazorMIn/BlazorMin.Client/Pages/Home.razor.css
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
2 |
3 | var builder = WebAssemblyHostBuilder.CreateDefault(args);
4 |
5 | await builder.Build().RunAsync();
6 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/Routes.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 | @*#if (Layout)
4 |
5 | #else
6 |
7 | #endif*@
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using static Microsoft.AspNetCore.Components.Web.RenderMode
7 | @using Microsoft.AspNetCore.Components.Web.Virtualization
8 | @using Microsoft.JSInterop
9 | @using BlazorMin.Client
10 | @using BlazorMin.Client.Pages
11 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/wwwroot/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.Client/wwwroot/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio Version 17
3 | VisualStudioVersion = 17.4.32804.182
4 | MinimumVisualStudioVersion = 16.0.0.0
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorMin\BlazorMin", "BlazorMin\BlazorMin.csproj", "{A34DA4F5-B21D-4757-BD8B-A03D34D209E2}"
6 | EndProject
7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorMin.Client", "BlazorMin.Client\BlazorMin.Client.csproj", "{B8D8DFFF-3971-4C1C-B6F0-0FDE31504D1B}"
8 | EndProject
9 | Global
10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
11 | Debug|Any CPU = Debug|Any CPU
12 | Release|Any CPU = Release|Any CPU
13 | EndGlobalSection
14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
15 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
17 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
18 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Release|Any CPU.Build.0 = Release|Any CPU
19 | {B8D8DFFF-3971-4C1C-B6F0-0FDE31504D1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20 | {B8D8DFFF-3971-4C1C-B6F0-0FDE31504D1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
21 | {B8D8DFFF-3971-4C1C-B6F0-0FDE31504D1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 | {B8D8DFFF-3971-4C1C-B6F0-0FDE31504D1B}.Release|Any CPU.Build.0 = Release|Any CPU
23 | EndGlobalSection
24 | GlobalSection(SolutionProperties) = preSolution
25 | HideSolutionNode = FALSE
26 | EndGlobalSection
27 | GlobalSection(ExtensibilityGlobals) = postSolution
28 | SolutionGuid = {A8CCCF7D-37EC-490E-9DD6-3D4F180C33EE}
29 | EndGlobalSection
30 | EndGlobal
31 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/BlazorMin.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0
5 | enable
6 | enable
7 | BlazorMin
8 | $(AssemblyName.Replace(' ', '_'))
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/BlazorMin.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio Version 17
3 | VisualStudioVersion = 17.4.32804.182
4 | MinimumVisualStudioVersion = 16.0.0.0
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorMin", "BlazorMin.csproj", "{A34DA4F5-B21D-4757-BD8B-A03D34D209E2}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
15 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
16 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Release|Any CPU.Build.0 = Release|Any CPU
17 | EndGlobalSection
18 | GlobalSection(SolutionProperties) = preSolution
19 | HideSolutionNode = FALSE
20 | EndGlobalSection
21 | GlobalSection(ExtensibilityGlobals) = postSolution
22 | SolutionGuid = {A8CCCF7D-37EC-490E-9DD6-3D4F180C33EE}
23 | EndGlobalSection
24 | EndGlobal
25 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Components/App.razor:
--------------------------------------------------------------------------------
1 | @*#if (!Routing)*@
2 | @page "/"
3 | @*#endif*@
4 |
5 |
6 |
7 |
8 |
9 |
10 | @*#if (Framework != "net8.0")*@
11 |
12 | @*#endif*@
13 | @*#if (Interactivity != "None" && Framework == "net8.0")*@
14 |
15 | @*#endif*@
16 | @*#if (Interactivity != "None" && Framework != "net8.0")*@
17 |
18 | @*#endif*@
19 | @*#if (Framework == "net8.0")*@
20 |
21 | @*#else*@
22 |
23 | @*#endif*@
24 | @*#if (Interactivity == "None")*@
25 |
26 | @*#elif (Interactivity == "Server")*@
27 |
28 | @*#elif (Interactivity == "WebAssembly")*@
29 |
30 | @*#elif (Interactivity == "Auto")*@
31 |
32 | @*#endif*@
33 |
34 |
35 | @*#if (Routing)*@
36 | @*#if (Interactivity == "None")*@
37 |
38 | @*#elif (Interactivity == "Server")*@
39 |
40 | @*#elif (Interactivity == "WebAssembly")*@
41 |
42 | @*#elif (Interactivity == "Auto")*@
43 |
44 | @*#endif*@
45 | @*#elif (Layout)*@
46 | @*#if (Interactivity == "None")*@
47 |
48 |
49 |
50 | @*#elif (Interactivity == "Server")*@
51 |
52 | @*#elif (Interactivity == "WebAssembly")*@
53 |
54 | @*#elif (Interactivity == "Auto")*@
55 |
56 | @*#endif*@
57 | @*#else*@
58 | @*#if (Interactivity == "None")*@
59 |
60 | @*#elif (Interactivity == "Server")*@
61 |
62 | @*#elif (Interactivity == "WebAssembly")*@
63 |
64 | @*#elif (Interactivity == "Auto")*@
65 |
66 | @*#endif*@
67 | @*#endif*@
68 | @*#if (!Layout && (Interactivity != "None"))*@
69 |
70 |
71 | An unhandled error has occurred.
72 |
Reload
73 |
🗙
74 |
75 |
76 | @*#endif*@
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Components/Layout/MainLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 | @Body
3 | @*#if (Interactivity != "None")
4 |
5 |
6 | An unhandled error has occurred.
7 |
Reload
8 |
🗙
9 |
10 | #endif*@
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Components/LayoutRoot.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Components/Pages/Home.razor:
--------------------------------------------------------------------------------
1 | @*#if (Routing)
2 | @page "/"
3 |
4 | #endif*@
5 |
6 |
7 | Welcome to @Title!
8 |
9 |
11 |
12 | @System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription |
13 | @*#if (Framework == "net8.0")*@
14 | @System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture
15 | @*#else*@
16 | @this.RendererInfo.Name (@System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture)
17 | @*#endif*@
18 |
19 |
Here are some links to help you start:
20 |
21 |
22 |
23 |
24 |
25 | @code {
26 | string Title = "Blazor";
27 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Components/Pages/Home.razor.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/Content/BlazorMIn/BlazorMin/Components/Pages/Home.razor.css
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Components/Routes.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 | @*#if (Layout)*@
4 |
5 | @*#else*@
6 |
7 | @*#endif*@
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Components/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using static Microsoft.AspNetCore.Components.Web.RenderMode
7 | @using Microsoft.AspNetCore.Components.Web.Virtualization
8 | @using Microsoft.JSInterop
9 | @using BlazorMin
10 | @using BlazorMin.Components
11 | @*#if (Interactivity == "None" || Interactivity == "Server")*@
12 | @*#if (Layout)*@
13 | @using BlazorMin.Components.Layout
14 | @*#endif*@
15 | @using BlazorMin.Components.Pages
16 | @*#endif*@
17 | @*#if (Interactivity == "WebAssembly" || Interactivity == "Auto")*@
18 | @using BlazorMin.Client
19 | @*#if (Layout)*@
20 | @using BlazorMin.Client.Layout
21 | @*#endif*@
22 | @using BlazorMin.Client.Pages
23 | @*#endif*@
24 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Program.cs:
--------------------------------------------------------------------------------
1 | #if (Interactivity == "WebAssembly" || Interactivity == "Auto")
2 | using BlazorMin.Client.Pages;
3 | #endif
4 | using BlazorMin.Components;
5 |
6 | var builder = WebApplication.CreateBuilder(args);
7 |
8 | // Add services to the container.
9 | #if (Interactivity == "None")
10 | builder.Services.AddRazorComponents();
11 | #else
12 | builder.Services.AddRazorComponents()
13 | #if (Interactivity == "Auto")
14 | .AddInteractiveServerComponents()
15 | .AddInteractiveWebAssemblyComponents();
16 | #elif (Interactivity == "Server")
17 | .AddInteractiveServerComponents();
18 | #elif (Interactivity == "WebAssembly")
19 | .AddInteractiveWebAssemblyComponents();
20 | #endif
21 | #endif
22 |
23 | var app = builder.Build();
24 |
25 | // Configure the HTTP request pipeline.
26 | #if (Interactivity == "WebAssembly" || Interactivity == "Auto")
27 | if (app.Environment.IsDevelopment())
28 | {
29 | app.UseWebAssemblyDebugging();
30 | }
31 | else
32 | #else
33 | if (!app.Environment.IsDevelopment())
34 | #endif
35 | {
36 | app.UseExceptionHandler("/Error", createScopeForErrors: true);
37 | #if (!NoHttps)
38 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
39 | app.UseHsts();
40 | #endif
41 | }
42 |
43 | #if (!NoHttps)
44 | app.UseHttpsRedirection();
45 |
46 | #endif
47 | #if (Framework == "net8.0")
48 | app.UseStaticFiles();
49 | #else
50 | app.MapStaticAssets();
51 | #endif
52 | app.UseAntiforgery();
53 |
54 | #if (Interactivity == "None")
55 | app.MapRazorComponents();
56 | #else
57 | app.MapRazorComponents()
58 | #if (Interactivity == "Server")
59 | .AddInteractiveServerRenderMode();
60 | #endif
61 | #if (Interactivity == "Auto")
62 | .AddInteractiveServerRenderMode()
63 | #endif
64 | #if (Interactivity == "WebAssembly" || Interactivity == "Auto")
65 | .AddInteractiveWebAssemblyRenderMode()
66 | .AddAdditionalAssemblies(typeof(Home).Assembly);
67 | #endif
68 | #endif
69 |
70 | app.Run();
71 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:8080",
7 | //#if(NoHttps)
8 | "sslPort": 0
9 | //#else
10 | "sslPort": 44300
11 | //#endif
12 | }
13 | },
14 | "profiles": {
15 | "http": {
16 | "commandName": "Project",
17 | "dotnetRunMessages": true,
18 | "launchBrowser": true,
19 | "applicationUrl": "http://localhost:5000",
20 | "environmentVariables": {
21 | "ASPNETCORE_ENVIRONMENT": "Development"
22 | }
23 | },
24 | //#if (!NoHttps)
25 | "https": {
26 | "commandName": "Project",
27 | "dotnetRunMessages": true,
28 | "launchBrowser": true,
29 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
30 | "environmentVariables": {
31 | "ASPNETCORE_ENVIRONMENT": "Development"
32 | }
33 | },
34 | //#endif
35 | "IIS Express": {
36 | "commandName": "IISExpress",
37 | "launchBrowser": true,
38 | "environmentVariables": {
39 | "ASPNETCORE_ENVIRONMENT": "Development"
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/wwwroot/css/blazor-ui.css:
--------------------------------------------------------------------------------
1 | #blazor-error-ui {
2 | background: #ffffe0;
3 | bottom: 0;
4 | box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
5 | display: none;
6 | left: 0;
7 | padding: .6rem 1.25rem .7rem 1.25rem;
8 | position: fixed;
9 | right: 0;
10 | z-index: 1000
11 | }
12 |
13 | #blazor-error-ui .dismiss {
14 | cursor: pointer;
15 | position: absolute;
16 | right: .75rem;
17 | top: .5rem
18 | }
19 |
20 | .blazor-error-boundary {
21 | background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
22 | padding: 1rem 1rem 1rem 3.7rem;
23 | color: white;
24 | }
25 |
26 | .blazor-error-boundary::after {
27 | content: "An error has occurred."
28 | }
--------------------------------------------------------------------------------
/Content/BlazorMIn/BlazorMin/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/Content/BlazorMIn/BlazorMin/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/Content/BlazorServerMin/.template.config/dotnetcli.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/dotnetcli.host",
3 | "symbolInfo": {
4 | "skipRestore": {
5 | "longName": "no-restore",
6 | "shortName": ""
7 | },
8 | "Framework": {
9 | "longName": "framework"
10 | },
11 | "NoHttps": {
12 | "longName": "no-https",
13 | "shortName": ""
14 | },
15 | "Routing": {
16 | "longName": "routing"
17 | },
18 | "Layout": {
19 | "longName": "layout"
20 | },
21 | "Solution": {
22 | "longName": "solution"
23 | },
24 | "kestrelHttpPort": {
25 | "isHidden": true
26 | },
27 | "kestrelHttpsPort": {
28 | "isHidden": true
29 | },
30 | "iisHttpPort": {
31 | "isHidden": true
32 | },
33 | "iisHttpsPort": {
34 | "isHidden": true
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Content/BlazorServerMin/.template.config/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/Content/BlazorServerMin/.template.config/icon.png
--------------------------------------------------------------------------------
/Content/BlazorServerMin/.template.config/ide.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/vs-2017.3.host",
3 | "order": 900,
4 | "icon": "icon.png",
5 | "ports": [
6 | {
7 | "name": "HttpPort",
8 | "useHttps": false
9 | },
10 | {
11 | "name": "HttpsPort",
12 | "useHttps": true
13 | }
14 | ],
15 | "disableHttpsSymbol": "NoHttps",
16 | "symbolInfo": [
17 | {
18 | "id": "Routing",
19 | "name": {
20 | "text": "Enable _routing"
21 | },
22 | "isVisible": true
23 | },
24 | {
25 | "id": "Layout",
26 | "name": {
27 | "text": "Enable shared _layout"
28 | },
29 | "isVisible": true
30 | }
31 | ]
32 | }
--------------------------------------------------------------------------------
/Content/BlazorServerMin/.template.config/ja-JP/strings.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0.0",
3 | "strings": {
4 | "name": "Blazor Server アプリ (空)",
5 | "description": "js および css ライブラリを一切含まない、空の Blazor Server アプリを作成するためのプロジェクト テンプレート。",
6 | "parameter.Routing.name": "ルーティングを有効化(_R)",
7 | "parameter.Layout.name": "共通レイアウトを有効化(_L)"
8 | }
9 | }
--------------------------------------------------------------------------------
/Content/BlazorServerMin/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "J.Sakamoto",
4 | "classifications": [
5 | "Web",
6 | "Blazor",
7 | "Empty"
8 | ],
9 | "groupIdentity": "Toolbelt.Web.Blazor.Server.Minimum",
10 | "identity": "Toolbelt.Web.Blazor.Server.Minimum.CSharp.7.0",
11 | "precedence": "7000",
12 | "name": "Blazor Server App (minimum)",
13 | "shortName": "blazorservermin",
14 | "description": "A project template for creating a Blazor Server app without any js and css libraries",
15 | "thirdPartyNotices": "https://github.com/jsakamoto/BlazorMinimumTemplates/blob/master/THIRD-PARTY-NOTICES.txt",
16 | "defaultName": "BlazorServerApp",
17 | "preferNameDirectory": true,
18 | "tags": {
19 | "language": "C#",
20 | "type": "project"
21 | },
22 | "symbols": {
23 | "HostIdentifier": {
24 | "type": "bind",
25 | "binding": "HostIdentifier"
26 | },
27 | "skipRestore": {
28 | "type": "parameter",
29 | "datatype": "bool",
30 | "description": "If specified, skips the automatic restore of the project on create.",
31 | "defaultValue": "false"
32 | },
33 | "Framework": {
34 | "type": "parameter",
35 | "description": "The target framework for the project.",
36 | "datatype": "choice",
37 | "choices": [
38 | {
39 | "choice": "net6.0",
40 | "description": "Target net60"
41 | },
42 | {
43 | "choice": "net7.0",
44 | "description": "Target net70"
45 | },
46 | {
47 | "choice": "net8.0",
48 | "description": "Target net80"
49 | },
50 | {
51 | "choice": "net9.0",
52 | "description": "Target net90"
53 | }
54 | ],
55 | "replaces": "net7.0",
56 | "defaultValue": "net8.0"
57 | },
58 | "kestrelHttpPort": {
59 | "type": "parameter",
60 | "datatype": "integer",
61 | "description": "Port number to use for the HTTP endpoint in launchSettings.json."
62 | },
63 | "kestrelHttpPortGenerated": {
64 | "type": "generated",
65 | "generator": "port",
66 | "parameters": {
67 | "low": 5000,
68 | "high": 5300
69 | }
70 | },
71 | "kestrelHttpPortReplacer": {
72 | "type": "generated",
73 | "generator": "coalesce",
74 | "parameters": {
75 | "sourceVariableName": "kestrelHttpPort",
76 | "fallbackVariableName": "kestrelHttpPortGenerated"
77 | },
78 | "replaces": "5000"
79 | },
80 | "kestrelHttpsPort": {
81 | "type": "parameter",
82 | "datatype": "integer",
83 | "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 (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
84 | },
85 | "kestrelHttpsPortGenerated": {
86 | "type": "generated",
87 | "generator": "port",
88 | "parameters": {
89 | "low": 7000,
90 | "high": 7300
91 | }
92 | },
93 | "kestrelHttpsPortReplacer": {
94 | "type": "generated",
95 | "generator": "coalesce",
96 | "parameters": {
97 | "sourceVariableName": "kestrelHttpsPort",
98 | "fallbackVariableName": "kestrelHttpsPortGenerated"
99 | },
100 | "replaces": "5001"
101 | },
102 | "iisHttpPort": {
103 | "type": "parameter",
104 | "datatype": "integer",
105 | "description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json."
106 | },
107 | "iisHttpPortGenerated": {
108 | "type": "generated",
109 | "generator": "port"
110 | },
111 | "iisHttpPortReplacer": {
112 | "type": "generated",
113 | "generator": "coalesce",
114 | "parameters": {
115 | "sourceVariableName": "iisHttpPort",
116 | "fallbackVariableName": "iisHttpPortGenerated"
117 | },
118 | "replaces": "8080"
119 | },
120 | "iisHttpsPort": {
121 | "type": "parameter",
122 | "datatype": "integer",
123 | "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 (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
124 | },
125 | "iisHttpsPortGenerated": {
126 | "type": "generated",
127 | "generator": "port",
128 | "parameters": {
129 | "low": 44300,
130 | "high": 44399
131 | }
132 | },
133 | "iisHttpsPortReplacer": {
134 | "type": "generated",
135 | "generator": "coalesce",
136 | "parameters": {
137 | "sourceVariableName": "iisHttpsPort",
138 | "fallbackVariableName": "iisHttpsPortGenerated"
139 | },
140 | "replaces": "44300"
141 | },
142 | "NoHttps": {
143 | "type": "parameter",
144 | "datatype": "bool",
145 | "defaultValue": "false",
146 | "description": "Whether to turn off HTTPS."
147 | },
148 | "Routing": {
149 | "type": "parameter",
150 | "datatype": "bool",
151 | "defaultValue": "false",
152 | "description": "If specified, enables routing for the Blazor Server app."
153 | },
154 | "Layout": {
155 | "type": "parameter",
156 | "datatype": "bool",
157 | "defaultValue": "false",
158 | "description": "If specified, enables shared layout for the Blazor Server app."
159 | },
160 | "Solution": {
161 | "type": "parameter",
162 | "datatype": "bool",
163 | "defaultValue": "false",
164 | "description": "If specified, adds a solution file for the standalone Blazor Server app."
165 | }
166 | },
167 | "guids": [
168 | "A34DA4F5-B21D-4757-BD8B-A03D34D209E2"
169 | ],
170 | "sourceName": "BlazorServerMin",
171 | "sources": [
172 | {
173 | "source": "./",
174 | "target": "./",
175 | "exclude": [
176 | ".template.config/**"
177 | ],
178 | "copyOnly": [
179 | "**/wwwroot/css/**"
180 | ],
181 | "modifiers": [
182 | {
183 | "condition": "(!Solution || (HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\"))",
184 | "exclude": [
185 | "*.sln"
186 | ]
187 | },
188 | {
189 | "condition": "(!Layout)",
190 | "exclude": [
191 | "Shared/**"
192 | ]
193 | },
194 | {
195 | "condition": "(!Routing)",
196 | "exclude": [
197 | "App.Routing.razor"
198 | ],
199 | "rename": {
200 | "App.NoRouting.razor": "App.razor"
201 | }
202 | },
203 | {
204 | "condition": "(Routing)",
205 | "rename": {
206 | "App.Routing.razor": "App.razor",
207 | "App.NoRouting.razor": "Pages/Index.razor",
208 | "App.razor.css": "Pages/Index.razor.css"
209 | }
210 | },
211 | {
212 | "condition": "Framework == \"net6.0\"",
213 | "exclude": [
214 | "Pages/_Host.Net7.cshtml"
215 | ],
216 | "rename": {
217 | "Pages/_Host.Net6.cshtml": "Pages/_Host.cshtml",
218 | "Pages/_Layout.Net6.cshtml": "Pages/_Layout.cshtml"
219 | }
220 | },
221 | {
222 | "condition": "Framework != \"net6.0\"",
223 | "exclude": [
224 | "Pages/_Host.Net6.cshtml",
225 | "Pages/_Layout.Net6.cshtml"
226 | ],
227 | "rename": {
228 | "Pages/_Host.Net7.cshtml": "Pages/_Host.cshtml"
229 | }
230 | }
231 | ]
232 | }
233 | ],
234 | "primaryOutputs": [
235 | {
236 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
237 | "path": "BlazorServerMin.csproj"
238 | },
239 | {
240 | "condition": "(Solution && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
241 | "path": "BlazorServerMin.sln"
242 | },
243 | {
244 | "condition": "(!Solution && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
245 | "path": "BlazorServerMin.csproj"
246 | }
247 | ],
248 | "postActions": [
249 | {
250 | "condition": "(!skipRestore)",
251 | "description": "Restore NuGet packages required by this project.",
252 | "manualInstructions": [
253 | {
254 | "text": "Run 'dotnet restore'"
255 | }
256 | ],
257 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
258 | "continueOnError": true
259 | }
260 | ]
261 | }
--------------------------------------------------------------------------------
/Content/BlazorServerMin/App.NoRouting.razor:
--------------------------------------------------------------------------------
1 | @*#if (Routing)
2 | @page "/"
3 | #endif*@
4 | @*#if (!Routing)
5 |
22 |
23 | #endif*@
24 | @*#if (!Routing && Layout)
25 |
26 | #endif*@
27 |
28 |
29 | Welcome to @Title!
30 |
31 |
33 |
34 | @System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription |
35 | @*#if (Framework == "net6.0" || Framework == "net7.0" || Framework == "net8.0")*@
36 | @System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture
37 | @*#else*@
38 | @this.RendererInfo.Name (@System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture)
39 | @*#endif*@
40 |
41 |
Here are some links to help you start:
42 |
43 |
44 |
45 | @*#if (Framework == "net6.0")
46 |
Please take our brief survey and tell us what you think.
47 | #endif*@
48 | @*#if (Framework == "net7.0")
49 |
Please take our brief survey and tell us what you think.
50 | #endif*@
51 |
52 | @*#if (!Routing && Layout)
53 |
54 | #endif*@
55 |
56 | @code {
57 | string Title = "Blazor";
58 | }
--------------------------------------------------------------------------------
/Content/BlazorServerMin/App.Routing.razor:
--------------------------------------------------------------------------------
1 | @*#if (Routing && Layout)
2 |
3 |
4 |
5 |
6 |
7 |
8 | Not found
9 |
10 | Sorry, there's nothing at this address.
11 |
12 |
13 |
14 | #endif*@
15 | @*#if (Routing && !Layout)
16 |
17 |
18 |
19 |
20 |
21 |
22 | Not found
23 | Sorry, there's nothing at this address.
24 |
25 |
26 | #endif*@
--------------------------------------------------------------------------------
/Content/BlazorServerMin/App.razor.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/BlazorServerMin.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0
5 | enable
6 | enable
7 | BlazorServerMin
8 | $(AssemblyName.Replace(' ', '_'))
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/BlazorServerMin.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio Version 17
3 | VisualStudioVersion = 17.4.32804.182
4 | MinimumVisualStudioVersion = 16.0.0.0
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorServerMin", "BlazorServerMin.csproj", "{A34DA4F5-B21D-4757-BD8B-A03D34D209E2}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(SolutionProperties) = preSolution
13 | HideSolutionNode = FALSE
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {A34DA4F5-B21D-4757-BD8B-A03D34D209E2}.Release|Any CPU.Build.0 = Release|Any CPU
20 | EndGlobalSection
21 | EndGlobal
22 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/Pages/Error.cshtml:
--------------------------------------------------------------------------------
1 | @page
2 | @model BlazorServerMin.Pages.ErrorModel
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Error
11 |
12 |
13 |
14 | Error.
15 | An error occurred while processing your request.
16 |
17 | @if (Model.ShowRequestId)
18 | {
19 |
20 | Request ID: @Model.RequestId
21 |
22 | }
23 |
24 | Development Mode
25 |
26 | Swapping to the Development environment displays detailed information about the error that occurred.
27 |
28 |
29 | The Development environment shouldn't be enabled for deployed applications.
30 | It can result in displaying sensitive information from exceptions to end users.
31 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
32 | and restarting the app.
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/Pages/Error.cshtml.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics;
2 | using Microsoft.AspNetCore.Mvc;
3 | using Microsoft.AspNetCore.Mvc.RazorPages;
4 |
5 | namespace BlazorServerMin.Pages;
6 |
7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
8 | [IgnoreAntiforgeryToken]
9 | public class ErrorModel : PageModel
10 | {
11 | public string? RequestId { get; set; }
12 |
13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
14 |
15 | private readonly ILogger _logger;
16 |
17 | public ErrorModel(ILogger logger)
18 | {
19 | _logger = logger;
20 | }
21 |
22 | public void OnGet()
23 | {
24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/Pages/_Host.Net6.cshtml:
--------------------------------------------------------------------------------
1 | @page "/"
2 | @namespace BlazorServerMin.Pages
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 | @{
5 | Layout = "_Layout";
6 | }
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/Pages/_Host.Net7.cshtml:
--------------------------------------------------------------------------------
1 | @page "/"
2 | @using Microsoft.AspNetCore.Components.Web
3 | @namespace BlazorServerMin.Pages
4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | @*#if (Framework != "net7.0" && Framework != "net8.0")*@
13 |
14 | @*#endif*@
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | An error has occurred. This application may no longer respond until reloaded.
25 |
26 |
27 | An unhandled exception has occurred. See browser dev tools for details.
28 |
29 |
Reload
30 |
🗙
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/Pages/_Layout.Net6.cshtml:
--------------------------------------------------------------------------------
1 | @using Microsoft.AspNetCore.Components.Web
2 | @namespace BlazorServerMin.Pages
3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | @*#if (Framework == "net8.0")*@
12 |
13 |
14 | @*#else*@
15 |
16 |
17 | @*#endif*@
18 |
19 |
20 |
21 | @RenderBody()
22 |
23 |
24 |
25 | An error has occurred. This application may no longer respond until reloaded.
26 |
27 |
28 | An unhandled exception has occurred. See browser dev tools for details.
29 |
30 |
Reload
31 |
🗙
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/Program.cs:
--------------------------------------------------------------------------------
1 | var builder = WebApplication.CreateBuilder(args);
2 |
3 | // Add services to the container.
4 | builder.Services.AddRazorPages();
5 | builder.Services.AddServerSideBlazor();
6 |
7 | var app = builder.Build();
8 |
9 | // Configure the HTTP request pipeline.
10 | if (!app.Environment.IsDevelopment())
11 | {
12 | app.UseExceptionHandler("/Error");
13 | #if (!NoHttps)
14 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
15 | app.UseHsts();
16 | #endif
17 | }
18 |
19 | #if (!NoHttps)
20 | app.UseHttpsRedirection();
21 |
22 | #endif
23 | #if (Framework == "net6.0" || Framework == "net7.0" || Framework == "net8.0")
24 | app.UseStaticFiles();
25 | #else
26 | app.MapStaticAssets();
27 | #endif
28 |
29 | app.UseRouting();
30 |
31 | app.MapBlazorHub();
32 | #if (Framework != "net6.0" && Framework != "net7.0" && Framework != "net8.0")
33 | app.MapRazorPages().WithStaticAssets();
34 | #endif
35 | app.MapFallbackToPage("/_Host");
36 |
37 | app.Run();
38 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:8080",
7 | //#if(NoHttps)
8 | "sslPort": 0
9 | //#else
10 | "sslPort": 44300
11 | //#endif
12 | }
13 | },
14 | "profiles": {
15 | "http": {
16 | "commandName": "Project",
17 | "dotnetRunMessages": true,
18 | "launchBrowser": true,
19 | "applicationUrl": "http://localhost:5000",
20 | "environmentVariables": {
21 | "ASPNETCORE_ENVIRONMENT": "Development"
22 | }
23 | },
24 | //#if (!NoHttps)
25 | "https": {
26 | "commandName": "Project",
27 | "dotnetRunMessages": true,
28 | "launchBrowser": true,
29 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
30 | "environmentVariables": {
31 | "ASPNETCORE_ENVIRONMENT": "Development"
32 | }
33 | },
34 | //#endif
35 | "IIS Express": {
36 | "commandName": "IISExpress",
37 | "launchBrowser": true,
38 | "environmentVariables": {
39 | "ASPNETCORE_ENVIRONMENT": "Development"
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Content/BlazorServerMin/Shared/MainLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 | @Body
3 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Authorization
3 | @using Microsoft.AspNetCore.Components.Authorization
4 | @using Microsoft.AspNetCore.Components.Forms
5 | @using Microsoft.AspNetCore.Components.Routing
6 | @using Microsoft.AspNetCore.Components.Web
7 | @using Microsoft.AspNetCore.Components.Web.Virtualization
8 | @using Microsoft.JSInterop
9 | @using BlazorServerMin
10 | @*#if (Layout)
11 | @using BlazorServerMin.Shared
12 | #endif*@
--------------------------------------------------------------------------------
/Content/BlazorServerMin/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "DetailedErrors": true,
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft.AspNetCore": "Warning"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/Content/BlazorServerMin/wwwroot/css/blazor-ui.css:
--------------------------------------------------------------------------------
1 | #blazor-error-ui {
2 | background: #ffffe0;
3 | bottom: 0;
4 | box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
5 | display: none;
6 | left: 0;
7 | padding: .6rem 1.25rem .7rem 1.25rem;
8 | position: fixed;
9 | right: 0;
10 | z-index: 1000
11 | }
12 |
13 | #blazor-error-ui .dismiss {
14 | cursor: pointer;
15 | position: absolute;
16 | right: .75rem;
17 | top: .5rem
18 | }
19 |
20 | .blazor-error-boundary {
21 | background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
22 | padding: 1rem 1rem 1rem 3.7rem;
23 | color: white;
24 | }
25 |
26 | .blazor-error-boundary::after {
27 | content: "An error has occurred."
28 | }
--------------------------------------------------------------------------------
/Content/BlazorServerMin/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/Content/BlazorServerMin/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/.template.config/dotnetcli.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/dotnetcli.host",
3 | "symbolInfo": {
4 | "skipRestore": {
5 | "longName": "no-restore",
6 | "shortName": ""
7 | },
8 | "Framework": {
9 | "longName": "framework"
10 | },
11 | "NoHttps": {
12 | "longName": "no-https",
13 | "shortName": ""
14 | },
15 | "Hosted": {
16 | "longName": "hosted"
17 | },
18 | "Routing": {
19 | "longName": "routing"
20 | },
21 | "Layout": {
22 | "longName": "layout"
23 | },
24 | "Solution": {
25 | "longName": "solution"
26 | },
27 | "kestrelHttpPort": {
28 | "isHidden": true
29 | },
30 | "kestrelHttpsPort": {
31 | "isHidden": true
32 | },
33 | "iisHttpPort": {
34 | "isHidden": true
35 | },
36 | "iisHttpsPort": {
37 | "isHidden": true
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/.template.config/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/Content/BlazorWasmMin/.template.config/icon.png
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/.template.config/ide.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/vs-2017.3.host",
3 | "order": 900,
4 | "icon": "icon.png",
5 | "ports": [
6 | {
7 | "name": "HttpPort",
8 | "useHttps": false
9 | },
10 | {
11 | "name": "HttpsPort",
12 | "useHttps": true
13 | }
14 | ],
15 | "disableHttpsSymbol": "NoHttps",
16 | "symbolInfo": [
17 | {
18 | "id": "Hosted",
19 | "name": {
20 | "text": "ASP.NET Core _hosted"
21 | },
22 | "isVisible": true
23 | },
24 | {
25 | "id": "Routing",
26 | "name": {
27 | "text": "Enable _routing"
28 | },
29 | "isVisible": true
30 | },
31 | {
32 | "id": "Layout",
33 | "name": {
34 | "text": "Enable shared _layout"
35 | },
36 | "isVisible": true
37 | }
38 | ]
39 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/.template.config/ja-JP/strings.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0.0",
3 | "strings": {
4 | "name": "Blazor WebAssembly アプリ (空)",
5 | "description": "js および css ライブラリを一切含まない、空の Blazor WebAssembly アプリを作成するためのプロジェクト テンプレート。",
6 | "parameter.Hosted.name": "ASP.NET Core でホスト(_H)",
7 | "parameter.Routing.name": "ルーティングを有効化(_R)",
8 | "parameter.Layout.name": "共通レイアウトを有効化(_L)"
9 | }
10 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "J.Sakamoto",
4 | "classifications": [
5 | "Web",
6 | "Blazor",
7 | "WebAssembly",
8 | "Empty"
9 | ],
10 | "groupIdentity": "Toolbelt.Web.Blazor.Wasm.Minimum",
11 | "identity": "Toolbelt.Web.Blazor.Wasm.Minimum.CSharp.7.0",
12 | "precedence": "7000",
13 | "name": "Blazor WebAssembly App (minimum)",
14 | "shortName": "blazorwasmmin",
15 | "description": "A project template for creating a Blazor WebAssembly app without any js and css libraries",
16 | "thirdPartyNotices": "https://github.com/jsakamoto/BlazorMinimumTemplates/blob/master/THIRD-PARTY-NOTICES.txt",
17 | "defaultName": "BlazorWasmApp",
18 | "preferNameDirectory": true,
19 | "tags": {
20 | "language": "C#",
21 | "type": "project"
22 | },
23 | "symbols": {
24 | "HostIdentifier": {
25 | "type": "bind",
26 | "binding": "HostIdentifier"
27 | },
28 | "skipRestore": {
29 | "type": "parameter",
30 | "datatype": "bool",
31 | "description": "If specified, skips the automatic restore of the project on create.",
32 | "defaultValue": "false"
33 | },
34 | "Framework": {
35 | "type": "parameter",
36 | "description": "The target framework for the project.",
37 | "datatype": "choice",
38 | "choices": [
39 | {
40 | "choice": "net6.0",
41 | "description": "Target net60"
42 | },
43 | {
44 | "choice": "net7.0",
45 | "description": "Target net70"
46 | },
47 | {
48 | "choice": "net8.0",
49 | "description": "Target net80"
50 | },
51 | {
52 | "choice": "net9.0",
53 | "description": "Target net90"
54 | }
55 | ],
56 | "replaces": "net7.0",
57 | "defaultValue": "net8.0"
58 | },
59 | "kestrelHttpPort": {
60 | "type": "parameter",
61 | "datatype": "integer",
62 | "description": "Port number to use for the HTTP endpoint in launchSettings.json."
63 | },
64 | "kestrelHttpPortGenerated": {
65 | "type": "generated",
66 | "generator": "port",
67 | "parameters": {
68 | "low": 5000,
69 | "high": 5300
70 | }
71 | },
72 | "kestrelHttpPortReplacer": {
73 | "type": "generated",
74 | "generator": "coalesce",
75 | "parameters": {
76 | "sourceVariableName": "kestrelHttpPort",
77 | "fallbackVariableName": "kestrelHttpPortGenerated"
78 | },
79 | "replaces": "5000"
80 | },
81 | "kestrelHttpsPort": {
82 | "type": "parameter",
83 | "datatype": "integer",
84 | "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 (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
85 | },
86 | "kestrelHttpsPortGenerated": {
87 | "type": "generated",
88 | "generator": "port",
89 | "parameters": {
90 | "low": 7000,
91 | "high": 7300
92 | }
93 | },
94 | "kestrelHttpsPortReplacer": {
95 | "type": "generated",
96 | "generator": "coalesce",
97 | "parameters": {
98 | "sourceVariableName": "kestrelHttpsPort",
99 | "fallbackVariableName": "kestrelHttpsPortGenerated"
100 | },
101 | "replaces": "5001"
102 | },
103 | "iisHttpPort": {
104 | "type": "parameter",
105 | "datatype": "integer",
106 | "description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json."
107 | },
108 | "iisHttpPortGenerated": {
109 | "type": "generated",
110 | "generator": "port"
111 | },
112 | "iisHttpPortReplacer": {
113 | "type": "generated",
114 | "generator": "coalesce",
115 | "parameters": {
116 | "sourceVariableName": "iisHttpPort",
117 | "fallbackVariableName": "iisHttpPortGenerated"
118 | },
119 | "replaces": "8080"
120 | },
121 | "iisHttpsPort": {
122 | "type": "parameter",
123 | "datatype": "integer",
124 | "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 (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
125 | },
126 | "iisHttpsPortGenerated": {
127 | "type": "generated",
128 | "generator": "port",
129 | "parameters": {
130 | "low": 44300,
131 | "high": 44399
132 | }
133 | },
134 | "iisHttpsPortReplacer": {
135 | "type": "generated",
136 | "generator": "coalesce",
137 | "parameters": {
138 | "sourceVariableName": "iisHttpsPort",
139 | "fallbackVariableName": "iisHttpsPortGenerated"
140 | },
141 | "replaces": "44300"
142 | },
143 | "NoHttps": {
144 | "type": "parameter",
145 | "datatype": "bool",
146 | "defaultValue": "false",
147 | "description": "Whether to turn off HTTPS."
148 | },
149 | "Hosted": {
150 | "type": "parameter",
151 | "datatype": "bool",
152 | "defaultValue": "false",
153 | "description": "If specified, includes an ASP.NET Core host for the Blazor WebAssembly app."
154 | },
155 | "Routing": {
156 | "type": "parameter",
157 | "datatype": "bool",
158 | "defaultValue": "false",
159 | "description": "If specified, enables routing for the Blazor WebAssembly app."
160 | },
161 | "Layout": {
162 | "type": "parameter",
163 | "datatype": "bool",
164 | "defaultValue": "false",
165 | "description": "If specified, enables shared layout for the Blazor WebAssembly app."
166 | },
167 | "Solution": {
168 | "type": "parameter",
169 | "datatype": "bool",
170 | "defaultValue": "false",
171 | "description": "If specified, adds a solution file for the standalone Blazor WebAssembly app."
172 | }
173 | },
174 | "guids": [
175 | "6E1E976D-315B-461F-8A47-DC6C0D69FEA8",
176 | "E4F5C735-BB90-4C44-8B6D-B7723A985B38",
177 | "0341B023-80E5-4FEA-B58E-CD70D1D432EC",
178 | "12616DCF-E921-48CA-A211-A262FA10D5E9"
179 | ],
180 | "sourceName": "BlazorWasmMin",
181 | "sources": [
182 | {
183 | "source": "./",
184 | "target": "./",
185 | "exclude": [
186 | ".template.config/**"
187 | ],
188 | "copyOnly": [],
189 | "modifiers": [
190 | {
191 | "condition": "(!Hosted)",
192 | "exclude": [
193 | "Server/**",
194 | "Shared/**",
195 | "BlazorWasmMin.sln"
196 | ],
197 | "rename": {
198 | ".Client.csproj": ".csproj",
199 | ".Client.sln": ".sln",
200 | "Client": "."
201 | }
202 | },
203 | {
204 | "condition": "(!Hosted && !Solution)",
205 | "exclude": [
206 | "Client/BlazorWasmMin.Client.sln"
207 | ]
208 | },
209 | {
210 | "condition": "(Hosted)",
211 | "exclude": [
212 | "Client/BlazorWasmMin.Client.sln"
213 | ]
214 | },
215 | {
216 | "condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
217 | "exclude": [
218 | "*.sln"
219 | ]
220 | },
221 | {
222 | "condition": "(!Layout)",
223 | "exclude": [
224 | "Client/Shared/**"
225 | ]
226 | },
227 | {
228 | "condition": "(!Routing)",
229 | "exclude": [
230 | "Client/App.Routing.razor",
231 | "Client/Pages/**"
232 | ]
233 | },
234 | {
235 | "condition": "(!Routing && !Hosted)",
236 | "rename": {
237 | "Client/App.NoRouting.razor": "App.razor"
238 | }
239 | },
240 | {
241 | "condition": "(!Routing && Hosted)",
242 | "rename": {
243 | "Client/App.NoRouting.razor": "Client/App.razor"
244 | }
245 | },
246 | {
247 | "condition": "(Routing && !Hosted)",
248 | "rename": {
249 | "Client/App.Routing.razor": "App.razor",
250 | "Client/App.NoRouting.razor": "Pages/Index.razor",
251 | "Client/App.razor.css": "Pages/Index.razor.css"
252 | }
253 | },
254 | {
255 | "condition": "(Routing && Hosted)",
256 | "rename": {
257 | "Client/App.Routing.razor": "Client/App.razor",
258 | "Client/App.NoRouting.razor": "Client/Pages/Index.razor",
259 | "Client/App.razor.css": "Client/Pages/Index.razor.css"
260 | }
261 | }
262 | ]
263 | }
264 | ],
265 | "primaryOutputs": [
266 | {
267 | "condition": "(Hosted && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
268 | "path": "BlazorWasmMin.sln"
269 | },
270 | {
271 | "condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
272 | "path": "Server/BlazorWasmMin.Server.csproj"
273 | },
274 | {
275 | "condition": "(!Hosted)",
276 | "path": "BlazorWasmMin.Client.csproj"
277 | },
278 | {
279 | "condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
280 | "path": "Client/BlazorWasmMin.Client.csproj"
281 | },
282 | {
283 | "condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
284 | "path": "Shared/BlazorWasmMin.Shared.csproj"
285 | }
286 | ],
287 | "postActions": [
288 | {
289 | "condition": "(!skipRestore && Hosted)",
290 | "description": "Restore NuGet packages required by this project.",
291 | "manualInstructions": [
292 | {
293 | "text": "Run 'dotnet restore'"
294 | }
295 | ],
296 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
297 | "continueOnError": true
298 | },
299 | {
300 | "condition": "(!skipRestore && !Hosted)",
301 | "description": "Restore NuGet packages required by this project.",
302 | "manualInstructions": [
303 | {
304 | "text": "Run 'dotnet restore'"
305 | }
306 | ],
307 | "args": {
308 | "files": [
309 | "BlazorWasmMin.Client.csproj"
310 | ]
311 | },
312 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
313 | "continueOnError": true
314 | }
315 | ]
316 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/BlazorWasmMin.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio Version 17
3 | VisualStudioVersion = 17.4.32804.182
4 | MinimumVisualStudioVersion = 16.0.0.0
5 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasmMin.Server", "Server\BlazorWasmMin.Server.csproj", "{6E1E976D-315B-461F-8A47-DC6C0D69FEA8}"
6 | EndProject
7 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasmMin.Client", "Client\BlazorWasmMin.Client.csproj", "{E4F5C735-BB90-4C44-8B6D-B7723A985B38}"
8 | EndProject
9 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasmMin.Shared", "Shared\BlazorWasmMin.Shared.csproj", "{0341B023-80E5-4FEA-B58E-CD70D1D432EC}"
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug|Any CPU = Debug|Any CPU
14 | Debug|x64 = Debug|x64
15 | Debug|x86 = Debug|x86
16 | Release|Any CPU = Release|Any CPU
17 | Release|x64 = Release|x64
18 | Release|x86 = Release|x86
19 | EndGlobalSection
20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
21 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
23 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Debug|x64.ActiveCfg = Debug|Any CPU
24 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Debug|x64.Build.0 = Debug|Any CPU
25 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Debug|x86.ActiveCfg = Debug|Any CPU
26 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Debug|x86.Build.0 = Debug|Any CPU
27 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
28 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Release|Any CPU.Build.0 = Release|Any CPU
29 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Release|x64.ActiveCfg = Release|Any CPU
30 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Release|x64.Build.0 = Release|Any CPU
31 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Release|x86.ActiveCfg = Release|Any CPU
32 | {6E1E976D-315B-461F-8A47-DC6C0D69FEA8}.Release|x86.Build.0 = Release|Any CPU
33 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|Any CPU.Build.0 = Debug|Any CPU
35 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|x64.ActiveCfg = Debug|Any CPU
36 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|x64.Build.0 = Debug|Any CPU
37 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|x86.ActiveCfg = Debug|Any CPU
38 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|x86.Build.0 = Debug|Any CPU
39 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|Any CPU.ActiveCfg = Release|Any CPU
40 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|Any CPU.Build.0 = Release|Any CPU
41 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|x64.ActiveCfg = Release|Any CPU
42 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|x64.Build.0 = Release|Any CPU
43 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|x86.ActiveCfg = Release|Any CPU
44 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|x86.Build.0 = Release|Any CPU
45 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
47 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Debug|x64.ActiveCfg = Debug|Any CPU
48 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Debug|x64.Build.0 = Debug|Any CPU
49 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Debug|x86.ActiveCfg = Debug|Any CPU
50 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Debug|x86.Build.0 = Debug|Any CPU
51 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
52 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Release|Any CPU.Build.0 = Release|Any CPU
53 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Release|x64.ActiveCfg = Release|Any CPU
54 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Release|x64.Build.0 = Release|Any CPU
55 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Release|x86.ActiveCfg = Release|Any CPU
56 | {0341B023-80E5-4FEA-B58E-CD70D1D432EC}.Release|x86.Build.0 = Release|Any CPU
57 | EndGlobalSection
58 | GlobalSection(SolutionProperties) = preSolution
59 | HideSolutionNode = FALSE
60 | EndGlobalSection
61 | GlobalSection(ExtensibilityGlobals) = postSolution
62 | SolutionGuid = {12616DCF-E921-48CA-A211-A262FA10D5E9}
63 | EndGlobalSection
64 | EndGlobal
65 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/App.NoRouting.razor:
--------------------------------------------------------------------------------
1 | @*#if (Routing)
2 | @page "/"
3 | #endif*@
4 | @*#if (!Routing)
5 |
22 |
23 | #endif*@
24 | @*#if (!Routing && Layout)
25 |
26 | #endif*@
27 |
28 |
29 | Welcome to @Title!
30 |
31 |
33 |
34 | @System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription |
35 | @*#if (Framework == "net6.0" || Framework == "net7.0" || Framework == "net8.0")*@
36 | @System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture
37 | @*#else*@
38 | @this.RendererInfo.Name (@System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture)
39 | @*#endif*@
40 |
41 |
Here are some links to help you start:
42 |
43 |
44 |
45 | @*#if (Framework == "net6.0")
46 |
Please take our brief survey and tell us what you think.
47 | #endif*@
48 | @*#if (Framework == "net7.0")
49 |
Please take our brief survey and tell us what you think.
50 | #endif*@
51 |
52 | @*#if (!Routing && Layout)
53 |
54 | #endif*@
55 |
56 | @code {
57 | string Title = "Blazor";
58 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/App.Routing.razor:
--------------------------------------------------------------------------------
1 | @*#if (Routing && Layout)
2 |
3 |
4 |
5 |
6 |
7 |
8 | Not found
9 |
10 | Sorry, there's nothing at this address.
11 |
12 |
13 |
14 | #endif*@
15 | @*#if (Routing && !Layout)
16 |
17 |
18 |
19 |
20 |
21 |
22 | Not found
23 | Sorry, there's nothing at this address.
24 |
25 |
26 | #endif*@
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/App.razor.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/BlazorWasmMin.Client.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0
5 | enable
6 | enable
7 |
8 | $(AssemblyName.Replace(' ', '_'))
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/BlazorWasmMin.Client.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio Version 17
3 | VisualStudioVersion = 17.4.32804.182
4 | MinimumVisualStudioVersion = 16.0.0.0
5 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasmMin", "BlazorWasmMin.csproj", "{E4F5C735-BB90-4C44-8B6D-B7723A985B38}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|Any CPU = Release|Any CPU
13 | Release|x64 = Release|x64
14 | Release|x86 = Release|x86
15 | EndGlobalSection
16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
17 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|Any CPU.Build.0 = Debug|Any CPU
19 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|x64.ActiveCfg = Debug|Any CPU
20 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|x64.Build.0 = Debug|Any CPU
21 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|x86.ActiveCfg = Debug|Any CPU
22 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Debug|x86.Build.0 = Debug|Any CPU
23 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|Any CPU.Build.0 = Release|Any CPU
25 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|x64.ActiveCfg = Release|Any CPU
26 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|x64.Build.0 = Release|Any CPU
27 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|x86.ActiveCfg = Release|Any CPU
28 | {E4F5C735-BB90-4C44-8B6D-B7723A985B38}.Release|x86.Build.0 = Release|Any CPU
29 | EndGlobalSection
30 | GlobalSection(SolutionProperties) = preSolution
31 | HideSolutionNode = FALSE
32 | EndGlobalSection
33 | GlobalSection(ExtensibilityGlobals) = postSolution
34 | SolutionGuid = {12616DCF-E921-48CA-A211-A262FA10D5E9}
35 | EndGlobalSection
36 | EndGlobal
37 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/Pages/_._:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 |
6 | namespace BlazorWOL.Server.Controllers
7 | {
8 | public class Class
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/Program.cs:
--------------------------------------------------------------------------------
1 | #if (Hosted)
2 | using BlazorWasmMin.Client;
3 | #else
4 | using BlazorWasmMin;
5 | #endif
6 | using Microsoft.AspNetCore.Components.Web;
7 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
8 |
9 | var builder = WebAssemblyHostBuilder.CreateDefault(args);
10 | builder.RootComponents.Add("#app");
11 | builder.RootComponents.Add("head::after");
12 |
13 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
14 |
15 | await builder.Build().RunAsync();
16 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:8080/",
7 | //#if(NoHttps)
8 | "sslPort": 0
9 | //#else
10 | "sslPort": 44300
11 | //#endif
12 | }
13 | },
14 | "profiles": {
15 | "http": {
16 | "commandName": "Project",
17 | "dotnetRunMessages": true,
18 | "launchBrowser": true,
19 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
20 | "applicationUrl": "http://localhost:5000",
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | }
24 | },
25 | //#if (!NoHttps)
26 | "https": {
27 | "commandName": "Project",
28 | "dotnetRunMessages": true,
29 | "launchBrowser": true,
30 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
31 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
32 | "environmentVariables": {
33 | "ASPNETCORE_ENVIRONMENT": "Development"
34 | }
35 | },
36 | //#endif
37 | "IIS Express": {
38 | "commandName": "IISExpress",
39 | "launchBrowser": true,
40 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
41 | "environmentVariables": {
42 | "ASPNETCORE_ENVIRONMENT": "Development"
43 | }
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/Shared/MainLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 | @Body
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using Microsoft.AspNetCore.Components.Web.Virtualization
7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http
8 | @using Microsoft.JSInterop
9 | @*#if (Hosted)
10 | @using BlazorWasmMin.Client
11 | #endif*@
12 | @*#if (Hosted && Layout)
13 | @using BlazorWasmMin.Client.Shared
14 | #endif*@
15 | @*#if (Hosted)
16 | @using BlazorWasmMin.Shared
17 | #endif*@
18 | @*#if (!Hosted)
19 | @using BlazorWasmMin
20 | #endif*@
21 | @*#if (!Hosted && Layout)
22 | @using BlazorWasmMin.Shared
23 | #endif*@
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/wwwroot/css/blazor-ui.css:
--------------------------------------------------------------------------------
1 | #blazor-error-ui {
2 | background: #ffffe0;
3 | bottom: 0;
4 | box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
5 | display: none;
6 | left: 0;
7 | padding: .6rem 1.25rem .7rem 1.25rem;
8 | position: fixed;
9 | right: 0;
10 | z-index: 1000
11 | }
12 |
13 | #blazor-error-ui .dismiss {
14 | cursor: pointer;
15 | position: absolute;
16 | right: .75rem;
17 | top: .5rem
18 | }
19 |
20 | .blazor-error-boundary {
21 | background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
22 | padding: 1rem 1rem 1rem 3.7rem;
23 | color: white;
24 | }
25 |
26 | .blazor-error-boundary::after {
27 | content: "An error has occurred."
28 | }
29 | /*#if (Framework != "net6.0")
30 |
31 | .loading-progress {
32 | position: relative;
33 | display: block;
34 | width: 8rem;
35 | height: 8rem;
36 | margin: 20vh auto 1rem auto;
37 | }
38 |
39 | .loading-progress circle {
40 | fill: none;
41 | stroke: #e0e0e0;
42 | stroke-width: 0.6rem;
43 | transform-origin: 50% 50%;
44 | transform: rotate(-90deg);
45 | }
46 |
47 | .loading-progress circle:last-child {
48 | stroke: #1b6ec2;
49 | stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
50 | transition: stroke-dasharray 0.05s ease-in-out;
51 | }
52 |
53 | .loading-progress-text {
54 | position: absolute;
55 | text-align: center;
56 | font-weight: bold;
57 | inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
58 | }
59 |
60 | .loading-progress-text:after {
61 | content: var(--blazor-load-percentage-text, "Loading");
62 | }
63 | #endif*/
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/Content/BlazorWasmMin/Client/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Client/wwwroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | BlazorWasmMin
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
Loading...
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | An unhandled error has occurred.
33 |
Reload
34 |
🗙
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Server/BlazorWasmMin.Server.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Server/Pages/Error.cshtml:
--------------------------------------------------------------------------------
1 | @page
2 | @model BlazorWasmMin.Server.Pages.ErrorModel
3 |
4 |
5 |
6 |
7 |
8 |
9 | Error
10 |
11 |
12 |
13 |
14 | Error.
15 | An error occurred while processing your request.
16 |
17 | @if (Model.ShowRequestId)
18 | {
19 |
20 | Request ID: @Model.RequestId
21 |
22 | }
23 |
24 | Development Mode
25 |
26 | Swapping to the Development environment displays detailed information about the error that occurred.
27 |
28 |
29 | The Development environment shouldn't be enabled for deployed applications.
30 | It can result in displaying sensitive information from exceptions to end users.
31 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
32 | and restarting the app.
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Server/Pages/Error.cshtml.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics;
2 | using Microsoft.AspNetCore.Mvc;
3 | using Microsoft.AspNetCore.Mvc.RazorPages;
4 |
5 | namespace BlazorWasmMin.Server.Pages;
6 |
7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
8 | [IgnoreAntiforgeryToken]
9 | public class ErrorModel : PageModel
10 | {
11 | public string? RequestId { get; set; }
12 |
13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
14 |
15 | private readonly ILogger _logger;
16 |
17 | public ErrorModel(ILogger logger)
18 | {
19 | _logger = logger;
20 | }
21 |
22 | public void OnGet()
23 | {
24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Server/Program.cs:
--------------------------------------------------------------------------------
1 | var builder = WebApplication.CreateBuilder(args);
2 |
3 | // Add services to the container.
4 |
5 | builder.Services.AddControllersWithViews();
6 | builder.Services.AddRazorPages();
7 |
8 | var app = builder.Build();
9 |
10 | // Configure the HTTP request pipeline.
11 | if (app.Environment.IsDevelopment())
12 | {
13 | app.UseWebAssemblyDebugging();
14 | }
15 | else
16 | {
17 | app.UseExceptionHandler("/Error");
18 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
19 | app.UseHsts();
20 | }
21 |
22 | app.UseHttpsRedirection();
23 |
24 | app.UseBlazorFrameworkFiles();
25 | app.UseStaticFiles();
26 |
27 | app.UseRouting();
28 |
29 |
30 | app.MapRazorPages();
31 | app.MapControllers();
32 | app.MapFallbackToFile("index.html");
33 |
34 | app.Run();
35 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Server/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:8080/",
7 | //#if(NoHttps)
8 | "sslPort": 0
9 | //#else
10 | "sslPort": 44300
11 | //#endif
12 | }
13 | },
14 | "profiles": {
15 | "http": {
16 | "commandName": "Project",
17 | "dotnetRunMessages": true,
18 | "launchBrowser": true,
19 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
20 | "applicationUrl": "http://localhost:5000",
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | }
24 | },
25 | //#if (!NoHttps)
26 | "https": {
27 | "commandName": "Project",
28 | "dotnetRunMessages": true,
29 | "launchBrowser": true,
30 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
31 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
32 | "environmentVariables": {
33 | "ASPNETCORE_ENVIRONMENT": "Development"
34 | }
35 | },
36 | //#endif
37 | "IIS Express": {
38 | "commandName": "IISExpress",
39 | "launchBrowser": true,
40 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
41 | "environmentVariables": {
42 | "ASPNETCORE_ENVIRONMENT": "Development"
43 | }
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Server/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Server/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Shared/BlazorWasmMin.Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Content/BlazorWasmMin/Shared/Class1.cs:
--------------------------------------------------------------------------------
1 | namespace BlazorWasmMin.Shared;
2 |
3 | public class Class1
4 | {
5 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Blazor Minimum Project Templates
2 |
3 | [](https://www.nuget.org/packages/Toolbelt.AspNetCore.Blazor.Minimum.Templates/) [](https://discord.com/channels/798312431893348414/1202165955900473375)
4 |
5 | ## Summary
6 |
7 | This is a project templates package for **"Blazor Server"**, **"Blazor WebAssembly"**, and **Full Stack "Blazor Web"** application without JavaScript and CSS libraries.
8 |
9 | > Blazor is a framework for building **full stack web apps** by **C#**, without writing a line of JavaScript. [Learn More...](https://blazor.net/)
10 |
11 | The Blazor application project created by these templates contains only the minimum necessary files, like this:
12 |
13 | 
14 |
15 | When you run this project, you will see the following page on a web browser.
16 |
17 | 
18 |
19 | ## System requirement
20 |
21 | - [.NET SDK](https://dotnet.microsoft.com/download/dotnet/) ver.6, 7, 8, 9 or later
22 |
23 | ## How to install
24 |
25 | If you use .NET SDK **ver.7 or later**, please enter the following command to install the project templates.
26 |
27 | ```shell
28 | > dotnet new install Toolbelt.AspNetCore.Blazor.Minimum.Templates::9.0.300
29 | ```
30 |
31 | If you use .NET SDK **ver.6**, please enter the following command to install the project templates.
32 |
33 | ```shell
34 | > dotnet new -i Toolbelt.AspNetCore.Blazor.Minimum.Templates::9.0.300
35 | ```
36 |
37 | ## How to use
38 |
39 | ### .NET CLI
40 |
41 | If you want to create a new Blazor **Server app** project, type the `dotnet new` command with the short name of the template "**blazorservermin**".
42 |
43 | ```shell
44 | > dotnet new blazorservermin
45 | ```
46 |
47 | If you want to create a new Blazor **WebAssembly app** project which standalone edition, type the `dotnet new` command with the short name of the template "**blazorwasmmin**".
48 |
49 | ```shell
50 | > dotnet new blazorwasmmin
51 | ```
52 |
53 | If you want to create a new Blazor **Web app** project that is a new model since .NET 8, type the `dotnet new` command with the short name of the template "**blazormin**".
54 |
55 | ```shell
56 | > dotnet new blazormin
57 | ```
58 |
59 | These commands create a new project in the current directory, and the project name will be the same as the current directory name.
60 |
61 | See also: ["dotnet new command - .NET Core CLI" | Microsoft Docs](https://docs.microsoft.com/dotnet/core/tools/dotnet-new)
62 |
63 | You can see all the options for these project templates with the `--help` option, like below:
64 |
65 | ```shell
66 | > dotnet new blazorwasmmin --help
67 | ```
68 |
69 | option | description
70 | -------|-----------------
71 | `--no-restore` | If specified, skips the automatic restore of the project on create.
72 | `-f`, `--framework` {`net6.0`, `net7.0`, `net8.0`, or `net9.0`} | The target framework for the project.
73 | `--no-https` | Whether to turn off HTTPS.
74 | `-ho`, `--hosted` | **[Blazor WebAssembly Only]** If specified, includes an ASP.NET Core host for the Blazor WebAssembly app.
75 | `-r`, `--routing` | If specified, enables routing for the Blazor app.
76 | `--layout` | If specified, enables shared layout for the Blazor app.
77 | `-int`, `--interactivity` {`none`, `server`, `webassembly`, or `auto`} | **[Blazor Web app only]** Chooses which interactive render mode to use for interactive components. (The default value is `none`)
78 | `-s`, `--solution` | **[.NET CLI only]** If specified, adds a solution file for the standalone Blazor WebAssembly or Blazor Server app.
79 |
80 | For example, if you want an ASP.NET Core hosted Blazor WebAssembly app project, please specify the `--hosted` switch.
81 |
82 | ```shell
83 | > dotnet new blazorwasmmin --hosted
84 | ```
85 |
86 | ### Visual Studio
87 |
88 | Once you've installed this project template with the `dotnet new install ...` command, you will see these project templates in your Visual Studio's "Create new project" dialog.
89 |
90 | 
91 |
92 | When you proceed with creating a new project with the project template "Blazor Server App (minimal)", "Blazor WebAssembly App (minimal)", or "Blazor Web App (minimal)", you can see the "Additional Information" dialog, and you can configure some options for the Blazor app you are creating.
93 |
94 | 
95 |
96 | ## What is the difference between the empty template built-in .NET SDK?
97 |
98 | - .NET 6.0 support
99 | - Rich initial loading page indicator for Blazor WebAssembly. (The normal project template of Blazor WebAssembly on .NET SDK has an excellent progress indication loading page. but the empty project template only shows "Loading..." static text at the top left corner of the page.)
100 | - No routing by default. (You can also enable routing support explicitly)
101 | - No shared layout by default. (You can also enable shared layout explicitly)
102 |
103 | In short, this "minimal" template will generate a **much simpler** project structure and files (by default, it doesn't even have routing code and shared layout code) than the Blazor empty template.
104 |
105 | ## License
106 |
107 | - [The Unlicense](https://github.com/jsakamoto/BlazorMinimumTemplates/blob/master/LICENSE)
108 | - The third party notice is [here.](https://github.com/jsakamoto/BlazorMinimumTemplates/blob/master/THIRD-PARTY-NOTICES.txt)
109 | - "FreeConverter.com" (https://www.freeconvert.com/png-to-svg) was used to vectorize Blazor logo.
110 |
--------------------------------------------------------------------------------
/RELEASE-NOTES.txt:
--------------------------------------------------------------------------------
1 | v.9.0.300
2 | - Update: Updated the referenced packages to 9.0.5 and 8.0.16.
3 |
4 | v.9.0.203
5 | - Update: Updated the referenced packages to 9.0.4 and 8.0.15.
6 |
7 | v.9.0.201
8 | - Update: Updated the referenced packages to 9.0.3 and 8.0.14.
9 |
10 | v.9.0.103
11 | - Update: Updated the referenced packages to 9.0.2 and 8.0.13.
12 |
13 | v.9.0.102
14 | - Update: Updated the referenced packages to 9.0.1 and 8.0.12.
15 |
16 | v.9.0.100
17 | - Update: Updated the referenced packages to 9.0.0, 8.0.11, and 6.0.36.
18 |
19 | v.9.0.100-rc.2
20 | - Update: Updated the referenced packages to 9.0.0 Release Candidate 2, 8.0.10, and 6.0.35.
21 |
22 | v.9.0.100-rc.1
23 | - Update: Updated the referenced packages to 9.0.0 Release Candidate 1.
24 |
25 | v.9.0.100-preview.7.3
26 | - Improve: Add an "importmap" script tag in a fallback page on .NET 9.
27 |
28 | v.9.0.100-preview.7.2
29 | - Fix: The generated project for .NET 6 could not be built.
30 |
31 | v.9.0.100-preview.7.1
32 | - Improve: Use "MapStaticAssets" instead of "UseStaticWebAssets" in the Startup.cs when the project is targeting the .NET 9.
33 |
34 | v.9.0.100-preview.7
35 | - Update: Updated the referenced packages to 9.0.0 preview 7.
36 |
37 | v.9.0.100-preview.6
38 | - Update: Updated the referenced packages to 9.0.0 preview 6.
39 |
40 | v.9.0.100-preview.4
41 | - Update: Updated the referenced packages to 9.0.0 preview 4.
42 |
43 | v.9.0.100-preview.3
44 | - Update: Add support for .NET 9.0 preview.
45 |
46 | v.8.0.403
47 | - Update: Updated the referenced packages to 8.0.10, and 6.0.35.
48 |
49 | v.8.0.400.1
50 | - Improve: Make Blazor Server fallback Razor pages single on .NET7 or later.
51 |
52 | v.8.0.400
53 | - Update: Updated the referenced packages to 8.0.8 and 6.0.33.
54 |
55 | v.8.0.303
56 | - Update: Updated the referenced packages to 8.0.7 and 6.0.32.
57 |
58 | v.8.0.301
59 | - Update: Updated the referenced packages to 8.0.6, 7.0.20 and 6.0.31.
60 |
61 | v.8.0.204
62 | - Update: Updated the referenced packages to 8.0.4, 7.0.18 and 6.0.29.
63 |
64 | v.8.0.202
65 | - Update: Updated the referenced packages to 8.0.3, 7.0.17 and 6.0.28.
66 |
67 | v.8.0.200.1
68 | - Update: Updated the referenced packages to 7.0.16.
69 |
70 | v.8.0.200
71 | - Update: Updated the referenced packages to 8.0.2 and 6.0.27.
72 |
73 | v.8.0.101.1
74 | - Update: Updated the referenced packages to 8.0.1, 7.0.16, and 6.0.26.
75 |
76 | v.8.0.101
77 | - Fix: A client project wasn't included in a solution file when a project was generated on Visual Studio.
78 |
79 | v.8.0.100
80 | - Improve: .NET 8 Blazor App style project support
--------------------------------------------------------------------------------
/THIRD-PARTY-NOTICES.txt:
--------------------------------------------------------------------------------
1 | Toolbelt.AspNetCore.Blazor.Minimum.Templates uses third-party libraries or
2 | other resources that may be distributed under licenses different than this
3 | product.
4 |
5 | The attached notices are provided for information only.
6 |
7 | License notice for ASP.NET Core
8 | ------------------------------------
9 |
10 | The MIT License (MIT)
11 |
12 | Copyright (c) .NET Foundation and Contributors
13 |
14 | All rights reserved.
15 |
16 | Permission is hereby granted, free of charge, to any person obtaining a copy
17 | of this software and associated documentation files (the "Software"), to deal
18 | in the Software without restriction, including without limitation the rights
19 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20 | copies of the Software, and to permit persons to whom the Software is
21 | furnished to do so, subject to the following conditions:
22 |
23 | The above copyright notice and this permission notice shall be included in all
24 | copies or substantial portions of the Software.
25 |
26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32 | SOFTWARE.
33 |
34 |
--------------------------------------------------------------------------------
/Toolbelt.AspNetCore.Blazor.Minimum.Templates.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Toolbelt.AspNetCore.Blazor.Minimum.Templates
9 | $(Version)
10 | Blazor Minimum Templates
11 | J.Sakamoto
12 | Templates for ASP.NET Core Blazor without any js and css libraries.
13 | aspnet templates blazor spa
14 | Unlicense
15 | https://github.com/jsakamoto/BlazorMinimumTemplates
16 | true
17 |
18 |
19 | Template
20 | net8.0
21 | true
22 | false
23 | /
24 | $(NoWarn);NU5128
25 | true
26 | README.md
27 | nupkg-icon.png
28 | (Please write the package release notes in "RELEASE NOTES.txt".)
29 | .\dist\
30 | $(ProjectDir)$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg
31 | true
32 |
33 |
34 |
35 | false
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | @(ReleaseNoteLines, '%0a');v.0.0
62 | $(PackageReleaseNotes.Replace('<','<'))
63 | $(PackageReleaseNotes.Replace('>','>'))
64 | $([System.Text.RegularExpressions.Regex]::Match($(PackageReleaseNotes), "^(v\.[\d\.]+.+?)v\.[\d\.]+", System.Text.RegularExpressions.RegexOptions.Singleline).Groups[1].Value)
65 | $(PackageReleaseNotes)%0aTo see all the change logs, please visit the following URL.%0a- $(PackageProjectUrl)/blob/master/RELEASE-NOTES.txt
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/Version.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | 9.0.300
4 |
5 |
--------------------------------------------------------------------------------
/dist/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsakamoto/BlazorMinimumTemplates/b3d63712621717fe8517bed0aac5bb7c40eb159a/dist/.gitkeep
--------------------------------------------------------------------------------
/test/Blazor.Minimum.Templates.Test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net9.0
5 | enable
6 | enable
7 | Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test
8 | false
9 | true
10 | $(PrepareForBuildDependsOn);_GenerateVersionInfoClass
11 | true
12 | Exe
13 | true
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | all
29 | runtime; build; native; contentfiles; analyzers; buildtransitive
30 |
31 |
32 | all
33 | runtime; build; native; contentfiles; analyzers; buildtransitive
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/test/Blazor.Minimum.Templates.Test.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.31903.59
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Minimum.Templates.Test", "Blazor.Minimum.Templates.Test.csproj", "{D502485F-9643-4A32-81B5-423E59D7CF50}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {D502485F-9643-4A32-81B5-423E59D7CF50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {D502485F-9643-4A32-81B5-423E59D7CF50}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {D502485F-9643-4A32-81B5-423E59D7CF50}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {D502485F-9643-4A32-81B5-423E59D7CF50}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/test/BlazorMinTests.cs:
--------------------------------------------------------------------------------
1 | using Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test.Internals;
2 | using static Toolbelt.Diagnostics.XProcess;
3 |
4 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test;
5 |
6 | [Parallelizable(ParallelScope.Children)]
7 | public class BlazorMinTests
8 | {
9 | private static int _numberOfApp;
10 |
11 | public static IEnumerable GetTestCases()
12 | {
13 | return from interactiveMode in new[] { InteractiveMode.None, InteractiveMode.Server, InteractiveMode.WebAssembly, InteractiveMode.Auto }
14 | from useRouting in new[] { RoutingOptions.NoRouting, RoutingOptions.Routing, }
15 | from useLayout in new[] { LayoutOptions.NoLayout, LayoutOptions.Layout }
16 | from framework in new[] { TargetFramework.Net8, TargetFramework.Net9 }
17 | select new object[] { interactiveMode, useRouting, useLayout, framework };
18 | }
19 |
20 | [TestCaseSource(nameof(GetTestCases))]
21 | public async Task DotNetNewAndBuild_Test(InteractiveMode interactiveMode, RoutingOptions routing, LayoutOptions layout, string framework)
22 | {
23 | Console.WriteLine($"{interactiveMode}, {routing}, {layout}, {framework}");
24 |
25 | var numberOfApp = Interlocked.Increment(ref _numberOfApp);
26 |
27 | using var workDir = new WorkDirectory();
28 |
29 | var args = string.Join(' ', new[] {
30 | "new", "blazormin",
31 | "-n", $"BlazorApp{numberOfApp:D4}",
32 | "-o", ".",
33 | "-f", framework,
34 | "-int", interactiveMode.ToString(),
35 | routing == RoutingOptions.Routing ? "-r" : "",
36 | layout == LayoutOptions.Layout ? "--layout" : "",
37 | }
38 | .Where(arg => !string.IsNullOrEmpty(arg)));
39 |
40 | var dotnetNew = await Start("dotnet", args, workDir).WaitForExitAsync();
41 | dotnetNew.ExitCode.Is(0, message: dotnetNew.Output);
42 |
43 | var dotnetBuild = await Start("dotnet", "build", workDir).WaitForExitAsync();
44 | dotnetBuild.ExitCode.Is(0, message: dotnetBuild.Output);
45 | }
46 | }
--------------------------------------------------------------------------------
/test/BlazorServerMinTests.cs:
--------------------------------------------------------------------------------
1 | using Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test.Internals;
2 | using static Toolbelt.Diagnostics.XProcess;
3 |
4 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test;
5 |
6 | [Parallelizable(ParallelScope.Children)]
7 | public class BlazorServerMinTests
8 | {
9 | private static int _numberOfApp;
10 |
11 | public static IEnumerable GetTestCases()
12 | {
13 | return from useRouting in new[] { RoutingOptions.NoRouting, RoutingOptions.Routing, }
14 | from useLayout in new[] { LayoutOptions.NoLayout, LayoutOptions.Layout }
15 | from framework in new[] { TargetFramework.Net6, TargetFramework.Net8, TargetFramework.Net9 }
16 | select new object[] { useRouting, useLayout, framework };
17 | }
18 |
19 | [TestCaseSource(nameof(GetTestCases))]
20 | public async Task DotNetNewAndBuild_Test(RoutingOptions routing, LayoutOptions layout, string framework)
21 | {
22 | Console.WriteLine($"{routing}, {layout}, {framework}");
23 |
24 | var numberOfApp = Interlocked.Increment(ref _numberOfApp);
25 |
26 | using var workDir = new WorkDirectory();
27 |
28 | var args = string.Join(' ', new[] {
29 | "new", "blazorservermin",
30 | "-n", $"BlazorServerApp{numberOfApp:D4}",
31 | "-o", ".",
32 | "-f", framework,
33 | routing == RoutingOptions.Routing ? "-r" : "",
34 | layout == LayoutOptions.Layout ? "--layout" : "",
35 | }
36 | .Where(arg => !string.IsNullOrEmpty(arg)));
37 |
38 | var dotnetNew = await Start("dotnet", args, workDir).WaitForExitAsync();
39 | dotnetNew.ExitCode.Is(0, message: dotnetNew.Output);
40 |
41 | var dotnetBuild = await Start("dotnet", "build", workDir).WaitForExitAsync();
42 | dotnetBuild.ExitCode.Is(0, message: dotnetBuild.Output);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/test/BlazorWasmMinTests.cs:
--------------------------------------------------------------------------------
1 | using Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test.Internals;
2 | using static Toolbelt.Diagnostics.XProcess;
3 |
4 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test;
5 |
6 | [Parallelizable(ParallelScope.Children)]
7 | public class BlazorWasmMinTests
8 | {
9 | private static int _numberOfApp;
10 |
11 | public static IEnumerable GetTestCases()
12 | {
13 | return from useRouting in new[] { RoutingOptions.NoRouting, RoutingOptions.Routing, }
14 | from useLayout in new[] { LayoutOptions.NoLayout, LayoutOptions.Layout }
15 | from framework in new[] { TargetFramework.Net6, TargetFramework.Net8, TargetFramework.Net9 }
16 | select new object[] { useRouting, useLayout, framework };
17 | }
18 |
19 | [TestCaseSource(nameof(GetTestCases))]
20 | public async Task DotNetNewAndBuild_Test(RoutingOptions routing, LayoutOptions layout, string framework)
21 | {
22 | Console.WriteLine($"{routing}, {layout}, {framework}");
23 |
24 | var numberOfApp = Interlocked.Increment(ref _numberOfApp);
25 |
26 | using var workDir = new WorkDirectory();
27 |
28 | var args = string.Join(' ', new[] {
29 | "new", "blazorwasmmin",
30 | "-n", $"BlazorWasmApp{numberOfApp:D4}",
31 | "-o", ".",
32 | "-f", framework,
33 | routing == RoutingOptions.Routing ? "-r" : "",
34 | layout == LayoutOptions.Layout ? "--layout" : "",
35 | }
36 | .Where(arg => !string.IsNullOrEmpty(arg)));
37 |
38 | var dotnetNew = await Start("dotnet", args, workDir).WaitForExitAsync();
39 | dotnetNew.ExitCode.Is(0, message: dotnetNew.Output);
40 |
41 | var dotnetBuild = await Start("dotnet", "build", workDir).WaitForExitAsync();
42 | dotnetBuild.ExitCode.Is(0, message: dotnetBuild.Output);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/test/Internals/InteractiveMode.cs:
--------------------------------------------------------------------------------
1 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test.Internals;
2 |
3 | public enum InteractiveMode
4 | {
5 | None,
6 | Server,
7 | WebAssembly,
8 | Auto
9 | }
10 |
--------------------------------------------------------------------------------
/test/Internals/LayoutOptions.cs:
--------------------------------------------------------------------------------
1 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test.Internals;
2 |
3 | public enum LayoutOptions
4 | {
5 | Layout,
6 | NoLayout,
7 | }
8 |
--------------------------------------------------------------------------------
/test/Internals/RoutingOptions.cs:
--------------------------------------------------------------------------------
1 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test.Internals;
2 |
3 | public enum RoutingOptions
4 | {
5 | Routing,
6 | NoRouting
7 | }
8 |
--------------------------------------------------------------------------------
/test/Internals/TargetFramework.cs:
--------------------------------------------------------------------------------
1 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test.Internals;
2 |
3 | internal static class TargetFramework
4 | {
5 | public const string Net6 = "net6.0";
6 | public const string Net8 = "net8.0";
7 | public const string Net9 = "net9.0";
8 | }
9 |
--------------------------------------------------------------------------------
/test/TestSetup.cs:
--------------------------------------------------------------------------------
1 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test;
2 | using static Toolbelt.Diagnostics.XProcess;
3 |
4 | [SetUpFixture]
5 | public class TestSetup
6 | {
7 | [OneTimeSetUp]
8 | public async Task GlobalSetup()
9 | {
10 | // Build the Blazor Minimal Templates
11 | var projectDir = Toolbelt.FileIO.FindContainerDirToAncestor("Toolbelt.AspNetCore.Blazor.Minimum.Templates.csproj");
12 | var dotnetBuild = await Start("dotnet", "pack", projectDir).WaitForExitAsync();
13 | dotnetBuild.ExitCode.Is(0, message: dotnetBuild.Output);
14 |
15 | // Uninstall and reinstall the templates package
16 | var packagePath = Path.Combine(projectDir, "dist", $"Toolbelt.AspNetCore.Blazor.Minimum.Templates.{VersionInfo.VersionText}.nupkg");
17 | await Start("dotnet", "new uninstall Toolbelt.AspNetCore.Blazor.Minimum.Templates").WaitForExitAsync();
18 | var dotnetNewInstall = await Start("dotnet", $"new install \"{packagePath}\"").WaitForExitAsync();
19 | dotnetNewInstall.ExitCode.Is(0, message: dotnetNewInstall.Output);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/test/VersionInfo.cs:
--------------------------------------------------------------------------------
1 | namespace Toolbelt.AspNetCore.Blazor.Minimum.Templates.Test;
2 | internal static class VersionInfo
3 | {
4 | internal const string VersionText = "9.0.300";
5 | }
6 |
--------------------------------------------------------------------------------