Skip to content

Commit 5d927f9

Browse files
committed
Update Orleans samples to 10.0.0
1 parent c1bc824 commit 5d927f9

File tree

171 files changed

+1402
-669
lines changed

Some content is hidden

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

171 files changed

+1402
-669
lines changed
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<OutputType>Exe</OutputType>
3+
<TargetFramework>net10.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
46
<ServerGarbageCollection>true</ServerGarbageCollection>
7+
<OutputType>Exe</OutputType>
58
</PropertyGroup>
69
<ItemGroup>
7-
<PackageReference Include="Microsoft.Extensions.Hosting"/>
8-
<PackageReference Include="Microsoft.Extensions.Logging.Console"/>
9-
<PackageReference Include="Microsoft.Orleans.Client"/>
10+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.2" />
11+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.2" />
12+
<PackageReference Include="Microsoft.Orleans.Client" Version="10.0.0" />
1013
</ItemGroup>
1114
<ItemGroup>
12-
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj"/>
15+
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj" />
1316
</ItemGroup>
1417
</Project>
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net10.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
6+
<ServerGarbageCollection>true</ServerGarbageCollection>
7+
</PropertyGroup>
28
<ItemGroup>
3-
<PackageReference Include="Microsoft.Orleans.Sdk"/>
9+
<PackageReference Include="Microsoft.Orleans.Sdk" Version="10.0.0" />
410
</ItemGroup>
511
</Project>
612

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net10.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
6+
<ServerGarbageCollection>true</ServerGarbageCollection>
7+
</PropertyGroup>
8+
29
<ItemGroup>
3-
<PackageReference Include="Microsoft.Orleans.Sdk"/>
10+
<PackageReference Include="Microsoft.Orleans.Sdk" Version="10.0.0" />
411
</ItemGroup>
12+
513
<ItemGroup>
6-
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj"/>
14+
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj" />
715
</ItemGroup>
816
</Project>

orleans/Adventure/AdventureServer/AdventureServer.csproj

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<OutputType>Exe</OutputType>
3+
<TargetFramework>net10.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
46
<ServerGarbageCollection>true</ServerGarbageCollection>
7+
<OutputType>Exe</OutputType>
58
</PropertyGroup>
69
<ItemGroup>
7-
<PackageReference Include="Microsoft.Extensions.Hosting"/>
8-
<PackageReference Include="Microsoft.Extensions.Logging.Console"/>
9-
<PackageReference Include="Microsoft.Orleans.Server"/>
10+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.2" />
11+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.2" />
12+
<PackageReference Include="Microsoft.Orleans.Server" Version="10.0.0" />
1013
</ItemGroup>
1114
<ItemGroup>
12-
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj"/>
13-
<ProjectReference Include="..\AdventureGrains\AdventureGrains.csproj"/>
15+
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj" />
16+
<ProjectReference Include="..\AdventureGrains\AdventureGrains.csproj" />
1417
</ItemGroup>
1518
<ItemGroup>
1619
<None Update="AdventureMap.json">

orleans/Adventure/AdventureServer/Program.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@
2626

2727
// Configure the host
2828
using var host = Host.CreateDefaultBuilder(args)
29-
.UseOrleans(siloBuilder =>
30-
{
31-
siloBuilder.UseLocalhostClustering();
32-
})
29+
.UseOrleans(siloBuilder => siloBuilder.UseLocalhostClustering())
3330
.Build();
3431

3532
// Start the host
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<Project>
2-
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
4-
<ImplicitUsings>enable</ImplicitUsings>
5-
<Nullable>enable</Nullable>
6-
<ServerGarbageCollection>true</ServerGarbageCollection>
7-
</PropertyGroup>
1+
<Project>
2+
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
83
</Project>

orleans/Adventure/Directory.Packages.props

Lines changed: 0 additions & 14 deletions
This file was deleted.

orleans/Adventure/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This is a simple game and there are only a few verbs which the game understands:
3434

3535
## Sample prerequisites
3636

37-
This sample is written in C# and targets .NET 9.0. It requires the [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0) or later.
37+
This sample is written in C# and targets .NET 10. It requires the [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) or later.
3838

3939
## Building the sample
4040

orleans/Adventure/run.cmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@echo off
2+
echo === Adventure Sample ===
3+
echo This sample requires running both server and client.
4+
echo.
5+
echo Starting server...
6+
start "Adventure Server" cmd /k dotnet run --project "%~dp0AdventureServer\AdventureServer.csproj"
7+
echo Waiting for server to start...
8+
timeout /t 5 /nobreak >nul
9+
echo Starting client...
10+
dotnet run --project "%~dp0AdventureClient\AdventureClient.csproj"

orleans/Adventure/run.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
SCRIPT_DIR="$(dirname "$0")"
3+
echo "=== Adventure Sample ==="
4+
echo "This sample requires running both server and client."
5+
echo ""
6+
echo "Starting server in background..."
7+
dotnet run --project "$SCRIPT_DIR/AdventureServer/AdventureServer.csproj" &
8+
SERVER_PID=$!
9+
echo "Waiting for server to start..."
10+
sleep 5
11+
echo "Starting client..."
12+
dotnet run --project "$SCRIPT_DIR/AdventureClient/AdventureClient.csproj"
13+
echo "Stopping server..."
14+
kill $SERVER_PID 2>/dev/null

0 commit comments

Comments
 (0)