Upgrade all projects to .NET 10

- OpenClaw.Tray.WinUI: net9.0 -> net10.0
- OpenClaw.Shared: multi-target -> net10.0 single target
- Updated build.ps1 to only require .NET 10
- Updated README with .NET 10 only prerequisites
- Updated issue #10 comment
This commit is contained in:
Scott Hanselman 2026-02-01 14:34:50 -08:00
parent 5f18e7b530
commit 758ce08cf0
4 changed files with 10 additions and 20 deletions

View File

@ -22,8 +22,7 @@ This monorepo contains three projects:
### Prerequisites
- Windows 10/11
- .NET 10.0 SDK (preview) - for WinForms tray
- .NET 9.0 SDK - for WinUI tray
- .NET 10.0 SDK (preview) - https://dotnet.microsoft.com/download/dotnet/10.0
- PowerToys (optional, for Command Palette extension)
### Build
@ -56,11 +55,11 @@ dotnet build src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj
### Run Tray App
```powershell
# WinForms version (.NET 10)
# WinForms version
dotnet run --project src/OpenClaw.Tray/OpenClaw.Tray.csproj
# WinUI version (.NET 9) - run the exe directly
.\src\OpenClaw.Tray.WinUI\bin\Debug\net9.0-windows10.0.19041.0\OpenClaw.Tray.WinUI.exe
# WinUI version - run the exe directly
.\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.19041.0\OpenClaw.Tray.WinUI.exe
```
## 📦 OpenClaw.Tray (Molty)

View File

@ -77,26 +77,17 @@ if (-not $dotnetVersion) {
} else {
Write-Success ".NET SDK: $dotnetVersion"
# Check for .NET 10 (needed for WinForms tray)
# Check for .NET 10 (needed for all projects)
$sdks = & dotnet --list-sdks 2>$null
$hasNet10 = $sdks | Where-Object { $_ -match "^10\." }
$hasNet9 = $sdks | Where-Object { $_ -match "^9\." }
if (-not $hasNet10) {
Write-Warning ".NET 10 SDK not found (needed for OpenClaw.Tray WinForms)"
Write-Error ".NET 10 SDK not found (required for all projects)"
Write-Info "Download preview from: https://dotnet.microsoft.com/download/dotnet/10.0"
$issues += "Missing .NET 10 SDK (for WinForms tray)"
$issues += "Missing .NET 10 SDK"
} else {
Write-Success ".NET 10 SDK available"
}
if (-not $hasNet9) {
Write-Warning ".NET 9 SDK not found (needed for OpenClaw.Tray.WinUI)"
Write-Info "Download from: https://dotnet.microsoft.com/download/dotnet/9.0"
$issues += "Missing .NET 9 SDK (for WinUI tray)"
} else {
Write-Success ".NET 9 SDK available"
}
}
# Check Windows SDK (for WinUI)
@ -212,7 +203,7 @@ if ($failCount -eq 0) {
Write-Host " WinForms: dotnet run --project src/OpenClaw.Tray/OpenClaw.Tray.csproj" -ForegroundColor White
}
if ($buildResults.ContainsKey("WinUI") -or $buildResults.ContainsKey("All")) {
Write-Host " WinUI: .\src\OpenClaw.Tray.WinUI\bin\$Configuration\net9.0-windows10.0.19041.0\OpenClaw.Tray.WinUI.exe" -ForegroundColor White
Write-Host " WinUI: .\src\OpenClaw.Tray.WinUI\bin\$Configuration\net10.0-windows10.0.19041.0\OpenClaw.Tray.WinUI.exe" -ForegroundColor White
}
} else {
Write-Host "$failCount build(s) failed" -ForegroundColor Red

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>OpenClaw.Shared</RootNamespace>

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
<UseWinUI>true</UseWinUI>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>