Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions orleans/Adventure/AdventureClient/AdventureClient.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting"/>
<PackageReference Include="Microsoft.Extensions.Logging.Console"/>
<PackageReference Include="Microsoft.Orleans.Client"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.2" />
<PackageReference Include="Microsoft.Orleans.Client" Version="10.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj"/>
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Sdk"/>
<PackageReference Include="Microsoft.Orleans.Sdk" Version="10.0.0" />
</ItemGroup>
</Project>

12 changes: 10 additions & 2 deletions orleans/Adventure/AdventureGrains/AdventureGrains.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Sdk"/>
<PackageReference Include="Microsoft.Orleans.Sdk" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj"/>
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj" />
</ItemGroup>
</Project>
15 changes: 9 additions & 6 deletions orleans/Adventure/AdventureServer/AdventureServer.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting"/>
<PackageReference Include="Microsoft.Extensions.Logging.Console"/>
<PackageReference Include="Microsoft.Orleans.Server"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.2" />
<PackageReference Include="Microsoft.Orleans.Server" Version="10.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj"/>
<ProjectReference Include="..\AdventureGrains\AdventureGrains.csproj"/>
<ProjectReference Include="..\AdventureGrainInterfaces\AdventureGrainInterfaces.csproj" />
<ProjectReference Include="..\AdventureGrains\AdventureGrains.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="AdventureMap.json">
Expand Down
5 changes: 1 addition & 4 deletions orleans/Adventure/AdventureServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@

// Configure the host
using var host = Host.CreateDefaultBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder.UseLocalhostClustering();
})
.UseOrleans(siloBuilder => siloBuilder.UseLocalhostClustering())
.Build();

// Start the host
Expand Down
9 changes: 2 additions & 7 deletions orleans/Adventure/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
14 changes: 0 additions & 14 deletions orleans/Adventure/Directory.Packages.props

This file was deleted.

2 changes: 1 addition & 1 deletion orleans/Adventure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This is a simple game and there are only a few verbs which the game understands:

## Sample prerequisites

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.
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.

## Building the sample

Expand Down
10 changes: 10 additions & 0 deletions orleans/Adventure/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
echo === Adventure Sample ===
echo This sample requires running both server and client.
echo.
echo Starting server...
start "Adventure Server" cmd /k dotnet run --project "%~dp0AdventureServer\AdventureServer.csproj"
echo Waiting for server to start...
timeout /t 5 /nobreak >nul
echo Starting client...
dotnet run --project "%~dp0AdventureClient\AdventureClient.csproj"
14 changes: 14 additions & 0 deletions orleans/Adventure/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
SCRIPT_DIR="$(dirname "$0")"
echo "=== Adventure Sample ==="
echo "This sample requires running both server and client."
echo ""
echo "Starting server in background..."
dotnet run --project "$SCRIPT_DIR/AdventureServer/AdventureServer.csproj" &
SERVER_PID=$!
echo "Waiting for server to start..."
sleep 5
echo "Starting client..."
dotnet run --project "$SCRIPT_DIR/AdventureClient/AdventureClient.csproj"
echo "Stopping server..."
kill $SERVER_PID 2>/dev/null
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Transactions"/>
<PackageReference Include="Microsoft.Orleans.Sdk"/>
<PackageReference Include="Microsoft.Orleans.Transactions" Version="10.0.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AccountTransfer.Interfaces\AccountTransfer.Interfaces.csproj"/>
<ProjectReference Include="..\AccountTransfer.Interfaces\AccountTransfer.Interfaces.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Transactions"/>
<PackageReference Include="Microsoft.Orleans.Sdk"/>
<PackageReference Include="Microsoft.Orleans.Transactions" Version="10.0.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="10.0.0" />
</ItemGroup>
</Project>
14 changes: 9 additions & 5 deletions orleans/BankAccount/BankClient/BankClient.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting"/>
<PackageReference Include="Microsoft.Extensions.Logging.Console"/>
<PackageReference Include="Microsoft.Orleans.Client"/>
<PackageReference Include="Microsoft.Orleans.Transactions"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.2" />
<PackageReference Include="Microsoft.Orleans.Client" Version="10.0.0" />
<PackageReference Include="Microsoft.Orleans.Transactions" Version="10.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AccountTransfer.Interfaces\AccountTransfer.Interfaces.csproj"/>
<ProjectReference Include="..\AccountTransfer.Interfaces\AccountTransfer.Interfaces.csproj" />
</ItemGroup>
</Project>
9 changes: 3 additions & 6 deletions orleans/BankAccount/BankClient/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using AccountTransfer.Interfaces;
using AccountTransfer.Interfaces;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

using IHost host = Host.CreateDefaultBuilder(args)
.UseOrleansClient(client =>
{
client.UseLocalhostClustering()
.UseTransactions();
})
.UseOrleansClient(client => client.UseLocalhostClustering()
.UseTransactions())
.UseConsoleLifetime()
.Build();

Expand Down
16 changes: 10 additions & 6 deletions orleans/BankAccount/BankServer/BankServer.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting"/>
<PackageReference Include="Microsoft.Extensions.Logging.Console"/>
<PackageReference Include="Microsoft.Orleans.Server"/>
<PackageReference Include="Microsoft.Orleans.Transactions"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.2" />
<PackageReference Include="Microsoft.Orleans.Server" Version="10.0.0" />
<PackageReference Include="Microsoft.Orleans.Transactions" Version="10.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AccountTransfer.Grains\AccountTransfer.Grains.csproj"/>
<ProjectReference Include="..\AccountTransfer.Interfaces\AccountTransfer.Interfaces.csproj"/>
<ProjectReference Include="..\AccountTransfer.Grains\AccountTransfer.Grains.csproj" />
<ProjectReference Include="..\AccountTransfer.Interfaces\AccountTransfer.Interfaces.csproj" />
</ItemGroup>
</Project>
9 changes: 3 additions & 6 deletions orleans/BankAccount/BankServer/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Hosting;

await Host.CreateDefaultBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
.UseOrleans(siloBuilder => siloBuilder
.UseLocalhostClustering()
.AddMemoryGrainStorageAsDefault()
.UseTransactions();
})
.UseTransactions())
.RunConsoleAsync();
8 changes: 2 additions & 6 deletions orleans/BankAccount/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>
15 changes: 0 additions & 15 deletions orleans/BankAccount/Directory.Packages.props

This file was deleted.

2 changes: 1 addition & 1 deletion orleans/BankAccount/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Task Withdraw(uint amount) => _balance.PerformUpdate(x =>

## Sample prerequisites

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.
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.

## Building the sample

Expand Down
10 changes: 10 additions & 0 deletions orleans/BankAccount/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
echo === BankAccount Sample ===
echo This sample requires running both server and client.
echo.
echo Starting server...
start "Bank Server" cmd /k dotnet run --project "%~dp0BankServer\BankServer.csproj"
echo Waiting for server to start...
timeout /t 5 /nobreak >nul
echo Starting client...
dotnet run --project "%~dp0BankClient\BankClient.csproj"
14 changes: 14 additions & 0 deletions orleans/BankAccount/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
SCRIPT_DIR="$(dirname "$0")"
echo "=== BankAccount Sample ==="
echo "This sample requires running both server and client."
echo ""
echo "Starting server in background..."
dotnet run --project "$SCRIPT_DIR/BankServer/BankServer.csproj" &
SERVER_PID=$!
echo "Waiting for server to start..."
sleep 5
echo "Starting client..."
dotnet run --project "$SCRIPT_DIR/BankClient/BankClient.csproj"
echo "Stopping server..."
kill $SERVER_PID 2>/dev/null
10 changes: 5 additions & 5 deletions orleans/Blazor/BlazorServer/BlazorServer.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Server" Version="9.0.1" />
<PackageReference Include="Microsoft.Orleans.Streaming" Version="9.0.1" />
<PackageReference Include="Microsoft.Orleans.Server" Version="10.0.0" />
<PackageReference Include="Microsoft.Orleans.Streaming" Version="10.0.0" />
</ItemGroup>

</Project>
9 changes: 4 additions & 5 deletions orleans/Blazor/BlazorServer/Components/App.razor
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="@Assets["lib/bootstrap/dist/css/bootstrap.min.css"]" />
<link rel="stylesheet" href="@Assets["app.css"]" />
<link rel="stylesheet" href="@Assets["BlazorServer.styles.css"]" />
<ImportMap />
<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="BlazorServer.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet @rendermode="@InteractiveServer" />
</head>
Expand Down
4 changes: 2 additions & 2 deletions orleans/Blazor/BlazorServer/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BlazorServer.Components;
using BlazorServer.Components;
using BlazorServer.Services;
using Orleans.Providers;

Expand Down Expand Up @@ -33,7 +33,7 @@

app.UseAntiforgery();

app.MapStaticAssets();
app.UseStaticFiles();
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MapStaticAssets() method has been replaced with UseStaticFiles(). However, MapStaticAssets() in .NET 9+ provides fingerprinting and optimization features that UseStaticFiles() does not. This change may impact asset caching and performance. Consider if this rollback to UseStaticFiles() is intentional for .NET 10.

Suggested change
app.UseStaticFiles();
app.MapStaticAssets();

Copilot uses AI. Check for mistakes.
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();

Expand Down
2 changes: 1 addition & 1 deletion orleans/Blazor/BlazorServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The application is based on the [official tutorial](https://dotnet.microsoft.com

## Sample prerequisites

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.
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.

## Building the sample

Expand Down
Loading
Loading