Skip to content

Commit 27b8e94

Browse files
ElanHassonclaude
andauthored
Upgrade to .NET 10 and update dependencies (#245)
* Upgrade to .NET 10 and update dependencies - Update all projects from net9.0 to net10.0 - Upgrade Aspire packages to 13.0.0 - Upgrade Microsoft.Extensions packages to 10.0.0 - Upgrade OpenTelemetry packages to 1.14.0 - Update Temporalio to 1.9.0 (from latest main) - Add session start hook for .NET 10 installation - Add .claude/settings.json with dotnet install hook - Add scripts/install-dotnet.sh for remote environments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Update CI workflows to use .NET 10 - Update dotnet.yml to use dotnet-version: 10.0.x - Update publish.yaml to use dotnet-version: 10.0.x 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove duplicate Temporalio.Extensions.DiagnosticSource reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix CI: remove workload restore and add preview quality .NET 10 is still in preview, so we need to specify dotnet-quality: 'preview' and the workload restore step is not needed for this project. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove preview quality - .NET 10 is released 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix XML syntax error in Worker.csproj Add missing closing </ItemGroup> tag 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent a936ed1 commit 27b8e94

File tree

9 files changed

+59
-16
lines changed

9 files changed

+59
-16
lines changed

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"SessionStart": [
4+
{
5+
"matcher": "startup",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "\"$CLAUDE_PROJECT_DIR\"/scripts/install-dotnet.sh"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.github/workflows/dotnet.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ jobs:
2323
- name: Setup .NET
2424
uses: actions/setup-dotnet@v5
2525
with:
26-
dotnet-version: 9.0.x
27-
- name: dotnet workload restore
28-
run: dotnet workload restore
26+
dotnet-version: 10.0.x
2927
- name: Restore dependencies
3028
run: dotnet restore
3129
- name: Build

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: install dotnet
3333
uses: actions/setup-dotnet@v5
3434
with:
35-
dotnet-version: 9.0.x
35+
dotnet-version: 10.0.x
3636
- name: dotnet pack
3737
if: ${{ github.event_name != 'release' }}
3838
run: dotnet pack ${{ env.TargetProject }} --configuration Release --output ${{ env.NuGetDirectory }}

sample/Api/Api.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
<InvariantGlobalization>true</InvariantGlobalization>

sample/AppHost/AppHost.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.0" />
2+
<Sdk Name="Aspire.AppHost.Sdk" Version="13.0.0" />
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<IsAspireHost>true</IsAspireHost>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.0" />
12+
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.0.0" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

sample/ServiceDefaults/ServiceDefaults.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Library</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<IsAspireSharedProject>true</IsAspireSharedProject>
@@ -11,13 +11,12 @@
1111
<ItemGroup>
1212
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1313

14-
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.9.0" />
15-
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="9.5.0" />
14+
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.0.0" />
15+
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="10.0.0" />
1616
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.14.0" />
1717
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0" />
1818
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.14.0" />
1919
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.8.0-beta.1" />
20-
<PackageReference Include="Temporalio.Extensions.DiagnosticSource" Version="1.9.0" />
2120
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.14.0" />
2221
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.14.0" />
2322
<PackageReference Include="Temporalio.Extensions.DiagnosticSource" Version="1.9.0" />

sample/Worker/Worker.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<UserSecretsId>dotnet-Worker-0059691c-eb4b-48c3-980f-e2478ee155e9</UserSecretsId>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.9" />
11+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0" />
1212
<PackageReference Include="Temporalio" Version="1.9.0" />
1313
<PackageReference Include="Temporalio.Extensions.Hosting" Version="1.9.0" />
14+
</ItemGroup>
15+
1416
<ItemGroup>
1517
<ProjectReference Include="..\ServiceDefaults\ServiceDefaults.csproj" />
1618
</ItemGroup>

scripts/install-dotnet.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# Only run in remote environments
4+
if [ "$CLAUDE_CODE_REMOTE" != "true" ]; then
5+
exit 0
6+
fi
7+
8+
echo "Installing .NET SDK in remote environment..."
9+
10+
# Install .NET SDK using official Microsoft script
11+
# This installs the latest .NET SDK
12+
curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
13+
bash dotnet-install.sh --channel 10.0
14+
rm dotnet-install.sh
15+
16+
# Add dotnet to PATH for current session
17+
export DOTNET_ROOT=$HOME/.dotnet
18+
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
19+
20+
# Persist environment variables for subsequent bash commands
21+
if [ -n "$CLAUDE_ENV_FILE" ]; then
22+
echo "export DOTNET_ROOT=$HOME/.dotnet" >> "$CLAUDE_ENV_FILE"
23+
echo "export PATH=\$PATH:\$DOTNET_ROOT:\$DOTNET_ROOT/tools" >> "$CLAUDE_ENV_FILE"
24+
fi
25+
26+
echo ".NET SDK installation complete"
27+
dotnet --version
28+
29+
exit 0

src/InfinityFlow.Aspire.Temporal/InfinityFlow.Aspire.Temporal.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net9.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
<PackageIcon>packageIcon.png</PackageIcon>
@@ -29,6 +29,6 @@
2929
</ItemGroup>
3030
<ItemGroup>
3131
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
32-
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.0" />
32+
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.0.0" />
3333
</ItemGroup>
3434
</Project>

0 commit comments

Comments
 (0)