Skip to content

Commit f65285b

Browse files
authored
Merge pull request #8 from tjmoore/updates
Update to .NET 10 & Aspire 13
2 parents 1a11f08 + b8fba32 commit f65285b

11 files changed

Lines changed: 61 additions & 38 deletions

File tree

.aspire/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"appHostPath": "../AppHost/AppHost.csproj"
3+
}

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919

2020
- name: Setup .NET
21-
uses: actions/setup-dotnet@v4
21+
uses: actions/setup-dotnet@v5
2222
with:
23-
dotnet-version: 9.0.x
23+
dotnet-version: 10.0.x
2424

2525
- name: Restore dependencies
2626
run: dotnet restore

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "aspire",
6+
"request": "launch",
7+
"name": "Aspire: Launch default apphost",
8+
"program": "${workspaceFolder}"
9+
}
10+
]
11+
}

AppHost/AppHost.csproj

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.2" />
3+
<Sdk Name="Aspire.AppHost.Sdk" Version="13.0.0" />
44

55
<PropertyGroup>
66
<OutputType>Exe</OutputType>
7-
<TargetFramework>net9.0</TargetFramework>
7+
<TargetFramework>net10.0</TargetFramework>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Nullable>enable</Nullable>
1010
<UserSecretsId>2f5cf0e6-04ba-425c-9e34-c6da020ecdfb</UserSecretsId>
1111
</PropertyGroup>
1212

13-
<ItemGroup>
14-
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.2" />
15-
</ItemGroup>
16-
1713
<ItemGroup>
1814
<ProjectReference Include="..\Backend\Backend.csproj" />
1915
<ProjectReference Include="..\Destination\Destination.csproj" />

Backend/Backend.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<UserSecretsId>246972d0-2477-4915-8d25-164c075b48f3</UserSecretsId>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<PackageReference Include="MessagePack" Version="3.1.4" />
12-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.10" />
13-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="9.0.10" />
14-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.10" />
12+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.0" />
13+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="10.0.0" />
14+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="10.0.0" />
1515
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
1616
<PackageReference Include="Serilog" Version="4.3.0" />
17-
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
17+
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

Destination/Destination.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>

Frontend/Frontend.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<UserSecretsId>e498ca58-c3d8-46f1-b349-6db90480b0c6</UserSecretsId>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<PackageReference Include="MessagePack" Version="3.1.4" />
12-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="9.0.10" />
13-
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.10" />
12+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="10.0.0" />
13+
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="10.0.0" />
1414
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
15-
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
15+
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

Model/Model.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The example here currently only routes to the first client that registers.
5656

5757
## Component technologies
5858

59-
* .NET 9 (should run on .NET 8 also, but targets 9 in the example projects)
59+
* .NET 10 (likely will work with .NET 8+)
6060
* SignalR
6161
* MessagePack for fast binary package transport https://github.com/MessagePack-CSharp/MessagePack-CSharp
6262
* Aspire .NET to orchestrate the environment and aid development and debug
@@ -67,16 +67,26 @@ The example here currently only routes to the first client that registers.
6767
Set `AppHost` as start up project and run (F5)
6868

6969
#### Visual Studio Code
70-
From Solution Explorer, right click `AppHost` and select Debug -> Start New Instance
70+
71+
Install Aspire CLI - https://learn.microsoft.com/en-us/dotnet/aspire/cli/install
72+
73+
Install Aspire Extension - https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/aspire-vscode-extension
74+
75+
Run with F5 or Run -> Start Debugging
76+
77+
Alternatively without the Aspire CLI / Extension, from Solution Explorer right click `AppHost` and select Debug -> Start New Instance
78+
7179

7280
#### Command Line
73-
Run `dotnet run --project AppHost`
81+
Install Aspire CLI - https://learn.microsoft.com/en-us/dotnet/aspire/cli/install
82+
83+
Run `aspire run`
7484

75-
You may have to select the dashboard link shown in the console output to launch in the browser
85+
Alternatively without Aspire CLI, run `dotnet run --project AppHost`
7686

7787
This will run the .NET Aspire host, launching the components and dashboard in the browser showing the service status.
7888

79-
If the Backend Gateway has connected to the frontend successfully, browse to the Frontend Proxy URL (http://localhost:5105 or https://localhost:7175).
89+
If the Backend Gateway has connected to the frontend successfully, browse to the Frontend Proxy URL (e.g. http://localhost:5105 or https://localhost:7175).
8090
This will send the HTTP request in the browser via the gateway to the destination endpoint at http://localhost:5174 and return the response or timeout if destination is not running.
8191

8292
## Configuration
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsAspireSharedProject>true</IsAspireSharedProject>
@@ -10,13 +10,13 @@
1010
<ItemGroup>
1111
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1212

13-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.10.0" />
14-
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="9.5.2" />
15-
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.13.1" />
16-
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.13.1" />
17-
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.13.0" />
18-
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.13.0" />
19-
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.13.0" />
13+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.0.0" />
14+
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="10.0.0" />
15+
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.14.0" />
16+
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0" />
17+
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0" />
18+
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
19+
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.14.0" />
2020
</ItemGroup>
2121

2222
</Project>

0 commit comments

Comments
 (0)