Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 068e6d2

Browse files
authored
Merge pull request #201 from DuendeSoftware/blazor-samples
Blazor Support (Preview)
2 parents a3cc773 + ce4d90d commit 068e6d2

File tree

146 files changed

+3033
-511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+3033
-511
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# MacOs
2+
.DS_Store
3+
14
# Rider
25
.idea
36

.run/API.run.xml

-17
This file was deleted.

.run/Infrastucture.run.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Infrastucture" type="CompoundRunConfigurationType">
3+
<toRun name="Api" type="LaunchSettings" />
34
<toRun name="IdentityServer" type="LaunchSettings" />
4-
<toRun name="API" type="LaunchSettings" />
55
<method v="2" />
66
</configuration>
77
</component>

.run/JS (.NET 3.1).run.xml

-17
This file was deleted.

.run/JS (EF).run.xml

-17
This file was deleted.

.run/SPA (.NET 5).run.xml

-17
This file was deleted.

.vscode/launch.json

+39-18
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"env": {
3333
"ASPNETCORE_ENVIRONMENT": "Development"
3434
},
35-
"console": "externalTerminal",
35+
"console": "integratedTerminal",
3636
"presentation": {
3737
"group": "Infrastructure",
3838
"hidden": false,
@@ -44,13 +44,13 @@
4444
"type": "coreclr",
4545
"request": "launch",
4646
"preLaunchTask": "build-api",
47-
"program": "${workspaceFolder}/samples/Api/bin/Debug/net8.0/Api.dll",
47+
"program": "${workspaceFolder}/samples/Apis/Api/bin/Debug/net8.0/Api.dll",
4848
"args": [],
49-
"cwd": "${workspaceFolder}/samples/Api",
49+
"cwd": "${workspaceFolder}/samples/Apis/Api",
5050
"env": {
5151
"ASPNETCORE_ENVIRONMENT": "Development"
5252
},
53-
"console": "externalTerminal",
53+
"console": "integratedTerminal",
5454
"presentation": {
5555
"group": "Infrastructure",
5656
"hidden": false,
@@ -62,13 +62,13 @@
6262
"type": "coreclr",
6363
"request": "launch",
6464
"preLaunchTask": "build-api.dpop",
65-
"program": "${workspaceFolder}/samples/Api.DPoP/bin/Debug/net8.0/Api.DPoP.dll",
65+
"program": "${workspaceFolder}/samples/Apis/Api.DPoP/bin/Debug/net8.0/Api.DPoP.dll",
6666
"args": [],
67-
"cwd": "${workspaceFolder}/samples/Api.DPoP",
67+
"cwd": "${workspaceFolder}/samples/Apis/Api.DPoP",
6868
"env": {
6969
"ASPNETCORE_ENVIRONMENT": "Development"
7070
},
71-
"console": "externalTerminal",
71+
"console": "integratedTerminal",
7272
"presentation": {
7373
"group": "Infrastructure",
7474
"hidden": false,
@@ -80,13 +80,13 @@
8080
"type": "coreclr",
8181
"request": "launch",
8282
"preLaunchTask": "build-api.isolated",
83-
"program": "${workspaceFolder}/samples/Api.Isolated/bin/Debug/net8.0/Api.Isolated.dll",
83+
"program": "${workspaceFolder}/samples/Apis/Api.Isolated/bin/Debug/net8.0/Api.Isolated.dll",
8484
"args": [],
85-
"cwd": "${workspaceFolder}/samples/Api.Isolated",
85+
"cwd": "${workspaceFolder}/samples/Apis/Api.Isolated",
8686
"env": {
8787
"ASPNETCORE_ENVIRONMENT": "Development"
8888
},
89-
"console": "externalTerminal",
89+
"console": "integratedTerminal",
9090
"presentation": {
9191
"group": "Infrastructure",
9292
"hidden": false,
@@ -108,7 +108,7 @@
108108
"action": "openExternally",
109109
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
110110
},
111-
"console": "externalTerminal",
111+
"console": "integratedTerminal",
112112
"presentation": {
113113
"hidden": false,
114114
"order": 10
@@ -129,7 +129,7 @@
129129
"action": "openExternally",
130130
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
131131
},
132-
"console": "externalTerminal",
132+
"console": "integratedTerminal",
133133
"presentation": {
134134
"hidden": false,
135135
"order": 10
@@ -150,28 +150,49 @@
150150
"action": "openExternally",
151151
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
152152
},
153-
"console": "externalTerminal",
153+
"console": "integratedTerminal",
154154
"presentation": {
155155
"hidden": false,
156156
"order": 10
157157
}
158158
},
159159
{
160-
"name": "Blazor Wasm",
160+
"name": "Blazor PerComponent",
161161
"type": "coreclr",
162162
"request": "launch",
163-
"preLaunchTask": "build-blazor.wasm",
164-
"program": "${workspaceFolder}/samples/Blazor.Wasm/Blazor.Wasm.Bff/bin/Debug/net8.0/Blazor.Wasm.Bff.dll",
163+
"preLaunchTask": "build-PerComponent",
164+
"program": "${workspaceFolder}/samples/Blazor/PerComponent/PerComponent/bin/Debug/net8.0/PerComponent.dll",
165165
"args": [],
166-
"cwd": "${workspaceFolder}/samples/Blazor.Wasm/Blazor.Wasm.Bff",
166+
"cwd": "${workspaceFolder}/samples/Blazor/PerComponent/PerComponent",
167167
"env": {
168168
"ASPNETCORE_ENVIRONMENT": "Development"
169169
},
170170
"serverReadyAction": {
171171
"action": "openExternally",
172172
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
173173
},
174-
"console": "externalTerminal",
174+
"console": "integratedTerminal",
175+
"presentation": {
176+
"hidden": false,
177+
"order": 10
178+
}
179+
},
180+
{
181+
"name": "Blazor WebAssembly",
182+
"type": "coreclr",
183+
"request": "launch",
184+
"preLaunchTask": "build-WebAssembly",
185+
"program": "${workspaceFolder}/samples/Blazor/WebAssembly/WebAssembly/bin/Debug/net8.0/WebAssembly.dll",
186+
"args": [],
187+
"cwd": "${workspaceFolder}/samples/Blazor/WebAssembly/WebAssembly",
188+
"env": {
189+
"ASPNETCORE_ENVIRONMENT": "Development"
190+
},
191+
"serverReadyAction": {
192+
"action": "openExternally",
193+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
194+
},
195+
"console": "integratedTerminal",
175196
"presentation": {
176197
"hidden": false,
177198
"order": 10

.vscode/tasks.json

+18-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"command": "dotnet",
3232
"args": [
3333
"build",
34-
"${workspaceFolder}/samples/Api/Api.csproj",
34+
"${workspaceFolder}/samples/Apis/Api/Api.csproj",
3535
"/property:GenerateFullPaths=true",
3636
"/consoleloggerparameters:NoSummary"
3737
],
@@ -43,7 +43,7 @@
4343
"command": "dotnet",
4444
"args": [
4545
"build",
46-
"${workspaceFolder}/samples/Api.DPoP/Api.DPoP.csproj",
46+
"${workspaceFolder}/samples/Apis/Api.DPoP/Api.DPoP.csproj",
4747
"/property:GenerateFullPaths=true",
4848
"/consoleloggerparameters:NoSummary"
4949
],
@@ -55,7 +55,7 @@
5555
"command": "dotnet",
5656
"args": [
5757
"build",
58-
"${workspaceFolder}/samples/Api.Isolated/Api.Isolated.csproj",
58+
"${workspaceFolder}/samples/Apis/Api.Isolated/Api.Isolated.csproj",
5959
"/property:GenerateFullPaths=true",
6060
"/consoleloggerparameters:NoSummary"
6161
],
@@ -110,12 +110,25 @@
110110
"problemMatcher": "$msCompile"
111111
},
112112
{
113-
"label": "build-blazor.wasm",
113+
"label": "build-PerComponent",
114114
"type": "process",
115115
"command": "dotnet",
116116
"args": [
117117
"build",
118-
"${workspaceFolder}/samples/Blazor.Wasm/Blazor.Wasm.Bff/Blazor.Wasm.Bff.csproj",
118+
"${workspaceFolder}/samples/Blazor/PerComponent/PerComponent/PerComponent.csproj",
119+
"/property:GenerateFullPaths=true",
120+
"/consoleloggerparameters:NoSummary"
121+
],
122+
"problemMatcher": "$msCompile"
123+
},
124+
125+
{
126+
"label": "build-WebAssembly",
127+
"type": "process",
128+
"command": "dotnet",
129+
"args": [
130+
"build",
131+
"${workspaceFolder}/samples/Blazor/WebAssembly/WebAssembly/WebAssembly.csproj",
119132
"/property:GenerateFullPaths=true",
120133
"/consoleloggerparameters:NoSummary"
121134
],

Directory.Build.targets

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<Project>
22
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0'">
33
<FrameworkVersionRuntime>8.0.0</FrameworkVersionRuntime>
4-
<FrameworkVersionTesting>8.0.0</FrameworkVersionTesting>
4+
<FrameworkVersionTesting>8.0.8</FrameworkVersionTesting>
5+
<WilsonVersion>7.1.2</WilsonVersion> <!-- Used in samples -->
56
<YarpVersion>2.1.0</YarpVersion>
6-
<IdentityServerVersion>7.0.4</IdentityServerVersion>
7+
<IdentityServerVersion>7.0.6</IdentityServerVersion>
78
</PropertyGroup>
89

910
<ItemGroup>
@@ -13,15 +14,26 @@
1314

1415
<!-- runtime -->
1516
<PackageReference Update="IdentityModel" Version="7.0.0" />
16-
<PackageReference Update="Duende.AccessTokenManagement.OpenIdConnect" Version="3.0.0-preview.3" />
17+
<PackageReference Update="Duende.AccessTokenManagement.OpenIdConnect" Version="3.0.0" />
1718
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="$(FrameworkVersionRuntime)" />
19+
<PackageReference Update="Microsoft.Extensions.Http" Version="$(FrameworkVersionRuntime)" />
20+
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly" Version="$(FrameworkVersionRuntime)" />
21+
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(FrameworkVersionRuntime)" />
22+
<PackageReference Update="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="$(FrameworkVersionRuntime)" />
23+
<PackageReference Update="Microsoft.AspNetCore.Components.Authorization" Version="$(FrameworkVersionRuntime)" />
1824
<PackageReference Update="Yarp.ReverseProxy" Version="$(YarpVersion)" />
1925

26+
<!-- samples -->
27+
<PackageReference Update="Serilog.AspNetCore" Version="8.0.2" />
28+
<PackageReference Update="Microsoft.IdentityModel.JsonWebTokens" Version="$(WilsonVersion)" />
29+
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="$(WilsonVersion)" />
30+
2031
<!-- testing -->
2132
<PackageReference Update="Microsoft.EntityFrameworkCore.InMemory" Version="$(FrameworkVersionTesting)" />
2233
<PackageReference Update="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(FrameworkVersionTesting)" />
2334
<PackageReference Update="Microsoft.AspNetCore.TestHost" Version="$(FrameworkVersionTesting)" />
24-
<PackageReference Update="Microsoft.Extensions.TimeProvider.Testing" Version="$(FrameworkVersionTesting)" />
35+
<!-- Test timeprovider is released separately from the framework, so we can't use FrameworkVersionTesting -->
36+
<PackageReference Update="Microsoft.Extensions.TimeProvider.Testing" Version="8.8.0" />
2537

2638
<PackageReference Update="Duende.IdentityServer" Version="$(IdentityServerVersion)" />
2739

0 commit comments

Comments
 (0)