From b84ccc2cbc18e3f1f6030f73218c8a2192f837e2 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 4 Jun 2026 11:37:53 +0200 Subject: [PATCH] **Update to .NET 10** --- .github/workflows/build_android.yml | 4 ++-- .github/workflows/build_ios.yml | 4 ++-- .github/workflows/build_linux.yml | 8 +++---- .github/workflows/build_mac.yml | 8 +++---- .github/workflows/build_windows.yml | 8 +++---- .github/workflows/cd.yml | 24 +++++++++---------- .github/workflows/cooking.yml | 4 ++-- .github/workflows/tests.yml | 20 ++++++++-------- Development/Scripts/Windows/CallBuildTool.bat | 2 +- Flax.flaxproj | 2 +- README.md | 24 +++++++++---------- .../Scripting/CodeEditors/RiderCodeEditor.cpp | 2 +- .../CodeEditors/VisualStudioCodeEditor.cpp | 6 ++--- Source/Engine/Core/Types/Variant.h | 1 + Source/Engine/Level/Actors/AnimatedModel.h | 2 ++ Source/Engine/Level/Actors/StaticModel.h | 2 ++ Source/Engine/Scripting/Runtime/DotNet.cpp | 6 ++--- .../Platforms/DotNet/AOT/Newtonsoft.Json.dll | 2 +- Source/Platforms/DotNet/Newtonsoft.Json.dll | 4 ++-- Source/Platforms/DotNet/Newtonsoft.Json.pdb | 4 ++-- .../FlaxEngine.CSharp.runtimeconfig.json | 4 ++-- Source/ThirdParty/nethost/nethost.Build.cs | 15 ++++++++++++ .../Flax.Build.Tests/Flax.Build.Tests.csproj | 2 +- .../Flax.Build/Build/Builder.Projects.cs | 4 ++-- .../Flax.Build/Build/DotNet/DotNetSdk.cs | 3 ++- .../Deps/Dependencies/NewtonsoftJson.cs | 17 +++---------- .../Flax.Build/Deps/Dependencies/nethost.cs | 2 +- Source/Tools/Flax.Build/Flax.Build.csproj | 2 +- Source/Tools/Flax.Build/Program.cs | 2 -- .../VisualStudio/VisualStudioInstance.cs | 2 +- Source/Tools/Flax.Build/global.json | 2 +- global.json | 2 +- 32 files changed, 101 insertions(+), 93 deletions(-) diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index e7a95b374..1af8697c8 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.419 + dotnet-version: 10.0.x - name: Setup .NET Workload run: | dotnet workload install android @@ -37,4 +37,4 @@ jobs: PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj" - .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Android -configuration=Release -buildtargets=FlaxGame + .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=10 -arch=ARM64 -platform=Android -configuration=Release -buildtargets=FlaxGame diff --git a/.github/workflows/build_ios.yml b/.github/workflows/build_ios.yml index 4e4291167..a83cd2233 100644 --- a/.github/workflows/build_ios.yml +++ b/.github/workflows/build_ios.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 9.0.x + dotnet-version: 10.0.x - name: Setup .NET Workload run: | dotnet workload install ios @@ -33,4 +33,4 @@ jobs: git lfs pull - name: Build run: | - ./Development/Scripts/Mac/CallBuildTool.sh -build -log -dotnet=9 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame + ./Development/Scripts/Mac/CallBuildTool.sh -build -log -dotnet=10 -arch=ARM64 -platform=iOS -configuration=Release -buildtargets=FlaxGame diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 36c8191a6..aa3c25fdb 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -23,7 +23,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -34,7 +34,7 @@ jobs: git lfs pull - name: Build run: | - ./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor + ./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor # Game game-linux: @@ -52,7 +52,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -63,4 +63,4 @@ jobs: git lfs pull - name: Build run: | - ./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Linux -configuration=Release -buildtargets=FlaxGame + ./Development/Scripts/Linux/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=x64 -platform=Linux -configuration=Release -buildtargets=FlaxGame diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index 07f672b12..b6af85129 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -30,7 +30,7 @@ jobs: git lfs pull - name: Build run: | - ./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor + ./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=ARM64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor # Game game-mac: @@ -44,7 +44,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -55,4 +55,4 @@ jobs: git lfs pull - name: Build run: | - ./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Mac -configuration=Release -buildtargets=FlaxGame + ./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=ARM64 -platform=Mac -configuration=Release -buildtargets=FlaxGame diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 93289c8ec..9b149838a 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.419 + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -34,7 +34,7 @@ jobs: PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj" - .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor + .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=10 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor # Game game-windows: @@ -48,7 +48,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.419 + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -62,4 +62,4 @@ jobs: PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj" - .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=8 -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame + .\Development\Scripts\Windows\CallBuildTool.bat -build -log -printSDKs -dotnet=10 -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9cbc3754a..998889489 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -28,7 +28,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.419 + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -38,7 +38,7 @@ jobs: PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj" - .\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8 + .\PackageEditor.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=10 - name: Upload uses: actions/upload-artifact@v7 with: @@ -64,7 +64,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.419 + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -74,7 +74,7 @@ jobs: PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj" - .\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=8 + .\PackagePlatforms.bat -arch=x64 -platform=Windows -deployOutput=Output -dotnet=10 - name: Upload uses: actions/upload-artifact@v7 with: @@ -101,14 +101,14 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info dotnet workload --info - name: Build run: | - ./PackageEditor.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=8 + ./PackageEditor.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=10 - name: Upload uses: actions/upload-artifact@v7 with: @@ -133,14 +133,14 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info dotnet workload --info - name: Build run: | - ./PackagePlatforms.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=8 + ./PackagePlatforms.sh -arch=x64 -platform=Linux -deployOutput=Output -dotnet=10 - name: Upload uses: actions/upload-artifact@v7 with: @@ -163,14 +163,14 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info dotnet workload --info - name: Build run: | - ./PackageEditor.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=8 + ./PackageEditor.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=10 - name: Upload uses: actions/upload-artifact@v7 with: @@ -191,14 +191,14 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info dotnet workload --info - name: Build run: | - ./PackagePlatforms.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=8 + ./PackagePlatforms.command -arch=ARM64 -platform=Mac -deployOutput=Output -dotnet=10 - name: Upload uses: actions/upload-artifact@v7 with: diff --git a/.github/workflows/cooking.yml b/.github/workflows/cooking.yml index 8c957bda1..5c6e1af6f 100644 --- a/.github/workflows/cooking.yml +++ b/.github/workflows/cooking.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Setup .NET Workload run: | dotnet workload install ios @@ -42,7 +42,7 @@ jobs: cp ".github/data/Build Settings.json" "FlaxSamples/MaterialsFeaturesTour/Content/Settings" - name: Build Editor run: | - ./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=8 -arch=ARM64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor + ./Development/Scripts/Mac/CallBuildTool.sh -build -log -printSDKs -dotnet=10 -arch=ARM64 -platform=Mac -configuration=Development -buildtargets=FlaxEditor - name: Cook Game (iOS) run: | ./Binaries/Editor/Mac/Development/FlaxEditor -std -headless -mute -null -project "FlaxSamples/MaterialsFeaturesTour" -build "Development.iOS" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 14e74074c..9dbcede39 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.x + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -34,18 +34,18 @@ jobs: chmod +x .github/data/bt.sh - name: Build run: | - ./GenerateProjectFiles.sh -vs2022 -log -verbose -printSDKs -dotnet=8 - ./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=8 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true + ./GenerateProjectFiles.sh -vs2026 -log -verbose -printSDKs -dotnet=10 + ./Development/Scripts/Linux/CallBuildTool.sh -build -log -dotnet=10 -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxTestsTarget -UseLargeWorlds=true dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo dotnet msbuild Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo - name: Test run: | ${GITHUB_WORKSPACE}/.github/data/bt.sh ./Binaries/Editor/Linux/Development/FlaxTests -headless - dotnet test -f net8.0 Binaries/Tests/Flax.Build.Tests.dll + dotnet test -f net10.0 Binaries/Tests/Flax.Build.Tests.dll cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.dll Binaries/Tests cp Binaries/Editor/Linux/Development/FlaxEngine.CSharp.runtimeconfig.json Binaries/Tests cp Binaries/Editor/Linux/Development/Newtonsoft.Json.dll Binaries/Tests - dotnet test -f net8.0 Binaries/Tests/FlaxEngine.CSharp.dll + dotnet test -f net10.0 Binaries/Tests/FlaxEngine.CSharp.dll # Tests on Windows tests-windows: @@ -57,7 +57,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.419 + dotnet-version: 10.0.x - name: Print .NET info run: | dotnet --info @@ -71,8 +71,8 @@ jobs: PowerShell "(Get-Content global.json).Replace('latestMajor', 'minor') | Set-Content global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/global.json).Replace('latestMajor', 'minor') | Set-Content Source/Tools/Flax.Build/global.json" PowerShell "(Get-Content Source/Tools/Flax.Build/Flax.Build.csproj).Replace('LatestMajor', 'Minor') | Set-Content Source/Tools/Flax.Build/Flax.Build.csproj" - .\GenerateProjectFiles.bat -vs2022 -log -verbose -printSDKs -dotnet=8 - .\Development\Scripts\Windows\CallBuildTool.bat -build -log -dotnet=8 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget + .\GenerateProjectFiles.bat -vs2026 -log -verbose -printSDKs -dotnet=10 + .\Development\Scripts\Windows\CallBuildTool.bat -build -log -dotnet=10 -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxTestsTarget dotnet msbuild Source\Tools\Flax.Build.Tests\Flax.Build.Tests.csproj /m /t:Restore,Build /p:Configuration=Debug /p:Platform=AnyCPU /nologo - name: Test shell: pwsh @@ -80,8 +80,8 @@ jobs: $ErrorActionPreference = "Stop" .\Binaries\Editor\Win64\Development\FlaxTests.exe -headless if(!$?) { Write-Host "Tests failed with exit code $LastExitCode" -ForegroundColor Red; Exit $LastExitCode } - dotnet test -f net8.0 Binaries\Tests\Flax.Build.Tests.dll + dotnet test -f net10.0 Binaries\Tests\Flax.Build.Tests.dll xcopy /y Binaries\Editor\Win64\Development\FlaxEngine.CSharp.dll Binaries\Tests xcopy /y Binaries\Editor\Win64\Development\FlaxEngine.CSharp.runtimeconfig.json Binaries\Tests xcopy /y Binaries\Editor\Win64\Development\Newtonsoft.Json.dll Binaries\Tests - dotnet test -f net8.0 Binaries\Tests\FlaxEngine.CSharp.dll + dotnet test -f net10.0 Binaries\Tests\FlaxEngine.CSharp.dll diff --git a/Development/Scripts/Windows/CallBuildTool.bat b/Development/Scripts/Windows/CallBuildTool.bat index a50525bdb..622915b58 100644 --- a/Development/Scripts/Windows/CallBuildTool.bat +++ b/Development/Scripts/Windows/CallBuildTool.bat @@ -34,7 +34,7 @@ goto Exit echo CallBuildTool ERROR: The script is in invalid directory. goto Exit :Error_NoVisualStudioEnvironment -echo CallBuildTool ERROR: Missing Visual Studio 2022 or newer. +echo CallBuildTool ERROR: Missing Visual Studio 2026 or newer. goto Exit :Error_CompilationFailed echo CallBuildTool ERROR: Failed to compile Flax.Build project. diff --git a/Flax.flaxproj b/Flax.flaxproj index 23e771811..4abc7bca6 100644 --- a/Flax.flaxproj +++ b/Flax.flaxproj @@ -4,7 +4,7 @@ "Major": 1, "Minor": 13, "Revision": 0, - "Build": 7004 + "Build": 7005 }, "Company": "Flax", "Copyright": "Copyright (c) 2012-2026 Wojciech Figat. All rights reserved.", diff --git a/README.md b/README.md index 924995b4f..0312fbf3c 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,10 @@ Follow the instructions below to compile and run the engine from source. ## Windows -* Install Visual Studio 2022 or newer -* Install Windows 8.1 SDK or newer (via Visual Studio Installer) +* Install Visual Studio 2026 or newer +* Install Windows 10 SDK or newer (via Visual Studio Installer) * Install Microsoft Visual C++ 2015 v140 toolset or newer (via Visual Studio Installer) -* Install .NET 8 SDK (or newer) for **Windows x64** (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)) +* Install .NET 10 SDK (or newer) for **Windows x64** (via Visual Studio Installer or [from web](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)) * Install Git with LFS * Clone repo (with LFS) * Run **GenerateProjectFiles.bat** @@ -44,10 +44,10 @@ Follow the instructions below to compile and run the engine from source. ## Linux * Install Visual Studio Code -* Install .NET 8 or 9 SDK ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)) - * Ubuntu: `sudo apt install dotnet-sdk-8.0` - * Fedora: `sudo dnf install dotnet-sdk-8.0` - * Arch: `sudo pacman -S dotnet-sdk-8.0 dotnet-runtime-8.0 dotnet-targeting-pack-8.0 dotnet-host` +* Install .NET 10 SDK (or newer) ([https://dotnet.microsoft.com/en-us/download/dotnet/10.0](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)) + * Ubuntu: `sudo apt install dotnet-sdk-10.0` + * Fedora: `sudo dnf install dotnet-sdk-10.0` + * Arch: `sudo pacman -S dotnet-sdk-10.0 dotnet-runtime-10.0 dotnet-targeting-pack-10.0 dotnet-host` * Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/)) * Ubuntu: `sudo apt install vulkan-sdk` (deprecated, follow official docs) * Fedora: `sudo dnf install vulkan-headers vulkan-tools vulkan-validation-layers` @@ -73,7 +73,7 @@ Follow the instructions below to compile and run the engine from source. ## Mac * Install XCode 16.4 (or newer) -* Install .NET 8 SDK (or newer) ([https://dotnet.microsoft.com/en-us/download/dotnet/8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)) +* Install .NET 10 SDK (or newer) ([https://dotnet.microsoft.com/en-us/download/dotnet/10.0](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)) * Install Vulkan SDK ([https://vulkan.lunarg.com/](https://vulkan.lunarg.com/)) * Clone repo (with LFS) * Run `GenerateProjectFiles.command` @@ -86,17 +86,17 @@ Follow the instructions below to compile and run the engine from source. Restart PC - ensure DotNet is added to PATH for command line tools execution. -* `Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 8.0` +* `Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 10.0. Either target .NET 5.0 or lower, or use a version of the .NET SDK that supports .NET 10.0` -Use Visual Studio 2022, older versions are not supported by .NET SDK 8. +Use Visual Studio 2026 (or newer), old Visual Studio versions are not supported by .NET SDK 10. * `Building for Windows without Vulkan rendering backend (Vulkan SDK is missing)` Install the Vulkan SDK then set an environment variable to provide the path to the SDK prior to running GenerateProjectFiles.bat: `set VULKAN_SDK=%sdk_path%`. -* `The NuGetSdkResolver did not resolve this SDK` +* `The NuGetSdkResolver did not resolve this SDK` / `Could not resolve SDK "Microsoft.NET.Sdk"` -Install `.NET SDK`, `NuGet package manager` and `NuGet targets and build tasks` in Visual Studio components. +Install `.NET SDK` 10, `NuGet package manager` and `NuGet targets and build tasks` in Visual Studio components. ## Workspace directory diff --git a/Source/Editor/Scripting/CodeEditors/RiderCodeEditor.cpp b/Source/Editor/Scripting/CodeEditors/RiderCodeEditor.cpp index de6001efd..32942b5a5 100644 --- a/Source/Editor/Scripting/CodeEditors/RiderCodeEditor.cpp +++ b/Source/Editor/Scripting/CodeEditors/RiderCodeEditor.cpp @@ -278,7 +278,7 @@ String RiderCodeEditor::GetName() const String RiderCodeEditor::GetGenerateProjectCustomArgs() const { - return TEXT("-vs2022"); + return TEXT("-vs2026"); } void RiderCodeEditor::OpenFile(const String& path, int32 line) diff --git a/Source/Editor/Scripting/CodeEditors/VisualStudioCodeEditor.cpp b/Source/Editor/Scripting/CodeEditors/VisualStudioCodeEditor.cpp index bf2ef6bb6..8ae2ba517 100644 --- a/Source/Editor/Scripting/CodeEditors/VisualStudioCodeEditor.cpp +++ b/Source/Editor/Scripting/CodeEditors/VisualStudioCodeEditor.cpp @@ -130,7 +130,7 @@ String VisualStudioCodeEditor::GetName() const String VisualStudioCodeEditor::GetGenerateProjectCustomArgs() const { - return TEXT("-vs2022 -vscode"); + return TEXT("-vs2026 -vscode"); } void VisualStudioCodeEditor::OpenFile(const String& path, int32 line) @@ -138,7 +138,7 @@ void VisualStudioCodeEditor::OpenFile(const String& path, int32 line) // Generate VS solution files for intellisense if (!FileSystem::FileExists(Globals::ProjectFolder / Editor::Project->Name + TEXT(".sln"))) { - ScriptsBuilder::GenerateProject(TEXT("-vs2022")); + ScriptsBuilder::GenerateProject(TEXT("-vs2026")); } // Generate project files if missing @@ -165,7 +165,7 @@ void VisualStudioCodeEditor::OpenSolution() // Generate VS solution files for intellisense if (!FileSystem::FileExists(Globals::ProjectFolder / Editor::Project->Name + TEXT(".sln"))) { - ScriptsBuilder::GenerateProject(TEXT("-vs2022")); + ScriptsBuilder::GenerateProject(TEXT("-vs2026")); } // Generate project files if solution is missing diff --git a/Source/Engine/Core/Types/Variant.h b/Source/Engine/Core/Types/Variant.h index 9532d4ec4..13c0a5a79 100644 --- a/Source/Engine/Core/Types/Variant.h +++ b/Source/Engine/Core/Types/Variant.h @@ -10,6 +10,7 @@ struct Transform; template class AssetReference; struct ScriptingTypeHandle; +template ScriptingTypeHandle StaticType(); /// /// Represents an object type that can be interpreted as more than one type. diff --git a/Source/Engine/Level/Actors/AnimatedModel.h b/Source/Engine/Level/Actors/AnimatedModel.h index b6d922744..bbfa6f0ea 100644 --- a/Source/Engine/Level/Actors/AnimatedModel.h +++ b/Source/Engine/Level/Actors/AnimatedModel.h @@ -489,7 +489,9 @@ public: ModelBase* GetModel() override; bool IntersectsEntry(int32 entryIndex, const Ray& ray, Real& distance, Vector3& normal) override; bool IntersectsEntry(const Ray& ray, Real& distance, Vector3& normal, int32& entryIndex) override; +PRAGMA_DISABLE_DEPRECATION_WARNINGS; bool GetMeshData(const MeshReference& ref, MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout** layout) const override; +PRAGMA_ENABLE_DEPRECATION_WARNINGS; MeshBase* GetMesh(const MeshReference& ref) const override; void UpdateBounds() override; MeshDeformation* GetMeshDeformation() const override; diff --git a/Source/Engine/Level/Actors/StaticModel.h b/Source/Engine/Level/Actors/StaticModel.h index 3a8c391f6..598b56118 100644 --- a/Source/Engine/Level/Actors/StaticModel.h +++ b/Source/Engine/Level/Actors/StaticModel.h @@ -181,7 +181,9 @@ public: ModelBase* GetModel() override; bool IntersectsEntry(int32 entryIndex, const Ray& ray, Real& distance, Vector3& normal) override; bool IntersectsEntry(const Ray& ray, Real& distance, Vector3& normal, int32& entryIndex) override; +PRAGMA_DISABLE_DEPRECATION_WARNINGS; bool GetMeshData(const MeshReference& ref, MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout** layout) const override; +PRAGMA_ENABLE_DEPRECATION_WARNINGS; MeshBase* GetMesh(const MeshReference& ref) const override; MeshDeformation* GetMeshDeformation() const override; void UpdateBounds() override; diff --git a/Source/Engine/Scripting/Runtime/DotNet.cpp b/Source/Engine/Scripting/Runtime/DotNet.cpp index ca4bb7921..cc3d93940 100644 --- a/Source/Engine/Scripting/Runtime/DotNet.cpp +++ b/Source/Engine/Scripting/Runtime/DotNet.cpp @@ -1568,7 +1568,7 @@ void* MMethod::GetThunk() MMethod* MMethod::InflateGeneric() const { - // This seams to be unused on .NET (Mono required inflating generic class of the script) + // This seems to be unused on .NET (Mono required inflating generic class of the script) return const_cast(this); } @@ -1877,9 +1877,9 @@ bool InitHostfxr() Platform::OpenUrl(TEXT("https://dotnet.microsoft.com/en-us/download/dotnet")); #endif #if USE_EDITOR - LOG(Fatal, "Missing .NET 8 or later SDK installation for {0} is required to run Flax Editor.", platformStr); + LOG(Fatal, "Missing .NET 10 or later SDK installation for {0} is required to run Flax Editor.", platformStr); #else - LOG(Fatal, "Missing .NET 8 or later Runtime installation for {0} is required to run this application.", platformStr); + LOG(Fatal, "Missing .NET 10 or later Runtime installation for {0} is required to run this application.", platformStr); #endif return true; } diff --git a/Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll b/Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll index 83d91e664..59b3ec4f5 100644 --- a/Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll +++ b/Source/Platforms/DotNet/AOT/Newtonsoft.Json.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c89720565cc1ab39345b7287cde6797596d3fbdcd7c5d816a67699897c3408a2 +oid sha256:020b6a90efa330685a92ddaf129dd417ca648072327756a101781430755d266b size 542720 diff --git a/Source/Platforms/DotNet/Newtonsoft.Json.dll b/Source/Platforms/DotNet/Newtonsoft.Json.dll index e0b49ce89..84a387c67 100644 --- a/Source/Platforms/DotNet/Newtonsoft.Json.dll +++ b/Source/Platforms/DotNet/Newtonsoft.Json.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5916f351729f50d48c9a58d40812925d3221e3db2684a932d3b52b697c113350 -size 605184 +oid sha256:c12c55574961be3aef66ff8e7b6b1e4bf4d23dfe223667c2d79209de942cb8a2 +size 605696 diff --git a/Source/Platforms/DotNet/Newtonsoft.Json.pdb b/Source/Platforms/DotNet/Newtonsoft.Json.pdb index 42a55ea2c..08564e099 100644 --- a/Source/Platforms/DotNet/Newtonsoft.Json.pdb +++ b/Source/Platforms/DotNet/Newtonsoft.Json.pdb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84e95396873f9613eb18d1813b5d368888bf1ca6a4c40f6398d1963b7b4b1337 -size 239620 +oid sha256:44d79c621a914269d85c6c489ca21e7f15915105515347b681893110e3d0dacf +size 240140 diff --git a/Source/ThirdParty/nethost/FlaxEngine.CSharp.runtimeconfig.json b/Source/ThirdParty/nethost/FlaxEngine.CSharp.runtimeconfig.json index f34374fb7..1075d1a93 100644 --- a/Source/ThirdParty/nethost/FlaxEngine.CSharp.runtimeconfig.json +++ b/Source/ThirdParty/nethost/FlaxEngine.CSharp.runtimeconfig.json @@ -1,9 +1,9 @@ { "runtimeOptions": { - "tfm": "net8.0", + "tfm": "net10.0", "framework": { "name": "Microsoft.NETCore.App", - "version": "8.0.0", + "version": "10.0.0", "rollForward": "latestMajor" } } diff --git a/Source/ThirdParty/nethost/nethost.Build.cs b/Source/ThirdParty/nethost/nethost.Build.cs index 2910e401d..10373cc27 100644 --- a/Source/ThirdParty/nethost/nethost.Build.cs +++ b/Source/ThirdParty/nethost/nethost.Build.cs @@ -10,6 +10,8 @@ using Flax.Build.NativeCpp; /// public class nethost : ThirdPartyModule { + private static bool _logDotnetOnce; + /// public override void Init() { @@ -41,6 +43,19 @@ public class nethost : ThirdPartyModule return; // Ignore missing Host Runtime at projects evaluation stage (not important) if (Configuration.BuildBindingsOnly) return; // Ignore missing Host Runtime when just building C# bindings (without native code) + if (!_logDotnetOnce) + { + // Dump dotnet info to help diagnose missing runtime issues + _logDotnetOnce = true; + try + { + Flax.Build.Utilities.Run("dotnet", "--info", null, null, Flax.Build.Utilities.RunOptions.ConsoleLogOutput); + } + catch (Exception) + { + // Ignore errors + } + } throw new Exception($"Missing NET SDK runtime for {options.Platform.Target} {options.Architecture}."); } diff --git a/Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj b/Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj index 0b7036058..711e35448 100644 --- a/Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj +++ b/Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 12.0 disable annotations diff --git a/Source/Tools/Flax.Build/Build/Builder.Projects.cs b/Source/Tools/Flax.Build/Build/Builder.Projects.cs index 46925355c..a0e043f64 100644 --- a/Source/Tools/Flax.Build/Build/Builder.Projects.cs +++ b/Source/Tools/Flax.Build/Build/Builder.Projects.cs @@ -205,7 +205,7 @@ namespace Flax.Build if (Configuration.ProjectFormatVSCode) projectFormats.Add(ProjectFormat.VisualStudioCode); if (Configuration.ProjectFormatRider) - projectFormats.Add(ProjectFormat.VisualStudio2022); + projectFormats.Add(ProjectFormat.VisualStudio2026); if (!string.IsNullOrEmpty(Configuration.ProjectFormatCustom)) projectFormats.Add(ProjectFormat.Custom); if (projectFormats.Count == 0) @@ -216,7 +216,7 @@ namespace Flax.Build !projectFormats.Contains(ProjectFormat.VisualStudio2022) && !projectFormats.Contains(ProjectFormat.VisualStudio)) { - projectFormats.Add(ProjectFormat.VisualStudio2022); + projectFormats.Add(ProjectFormat.VisualStudio2026); } foreach (ProjectFormat projectFormat in projectFormats) diff --git a/Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs b/Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs index de0fa755c..0d2889368 100644 --- a/Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs +++ b/Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs @@ -131,7 +131,7 @@ namespace Flax.Build /// /// The minimum SDK version. /// - public static Version MinimumVersion => new Version(8, 0); + public static Version MinimumVersion => new Version(10, 0); /// /// The maximum SDK version. @@ -167,6 +167,7 @@ namespace Flax.Build /// public string CSharpLanguageVersion => Version.Major switch { + _ when Version.Major >= 11 => "15.0", _ when Version.Major >= 10 => "14.0", _ when Version.Major >= 9 => "13.0", _ when Version.Major >= 8 => "12.0", diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/NewtonsoftJson.cs b/Source/Tools/Flax.Build/Deps/Dependencies/NewtonsoftJson.cs index 58fb21b25..9022fcda3 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/NewtonsoftJson.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/NewtonsoftJson.cs @@ -19,18 +19,7 @@ namespace Flax.Deps.Dependencies switch (BuildPlatform) { case TargetPlatform.Windows: - return new[] - { - TargetPlatform.Windows, - TargetPlatform.Linux, - TargetPlatform.XboxOne, - TargetPlatform.XboxScarlett, - TargetPlatform.PS4, - TargetPlatform.PS5, - TargetPlatform.Switch, - TargetPlatform.Mac, - TargetPlatform.iOS, - }; + return Globals.AllPlatforms; default: return new TargetPlatform[0]; } } @@ -67,13 +56,13 @@ namespace Flax.Deps.Dependencies "Newtonsoft.Json.pdb", "Newtonsoft.Json.xml", }; - var binFolder = Path.Combine(root, "Src", "Newtonsoft.Json", "bin", configuration, "net8.0"); + var binFolder = Path.Combine(root, "Src", "Newtonsoft.Json", "bin", configuration, "net10.0"); // Get the source CloneGitRepo(root, "https://github.com/FlaxEngine/Newtonsoft.Json.git"); // Default build - GitCheckout(root, "flax-net80"); + GitCheckout(root, "flax-net100"); Deploy.VCEnvironment.BuildSolution(solutionPath, configuration, buildPlatform); { var platform = "JIT"; diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs b/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs index f67244c9b..83a9302f7 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs @@ -53,7 +53,7 @@ namespace Flax.Deps.Dependencies { // Build configuration (see build.cmd -help) string configuration = "Release"; - string framework = "net8.0"; + string framework = "net10.0"; // Clean output directory var artifacts = Path.Combine(root, "artifacts"); diff --git a/Source/Tools/Flax.Build/Flax.Build.csproj b/Source/Tools/Flax.Build/Flax.Build.csproj index 4b22d6924..6687ee6f8 100644 --- a/Source/Tools/Flax.Build/Flax.Build.csproj +++ b/Source/Tools/Flax.Build/Flax.Build.csproj @@ -1,7 +1,7 @@  Exe - net8.0 + net10.0 12.0 disable annotations diff --git a/Source/Tools/Flax.Build/Program.cs b/Source/Tools/Flax.Build/Program.cs index 0c5d2b6f9..9fd34907a 100644 --- a/Source/Tools/Flax.Build/Program.cs +++ b/Source/Tools/Flax.Build/Program.cs @@ -16,8 +16,6 @@ namespace Flax.Build static int Main() { // Setup - ServicePointManager.Expect100Continue = true; - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var culture = CultureInfo.InvariantCulture; CultureInfo.DefaultThreadCurrentCulture = culture; CultureInfo.DefaultThreadCurrentUICulture = culture; diff --git a/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioInstance.cs b/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioInstance.cs index 0fa096089..63cce482f 100644 --- a/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioInstance.cs +++ b/Source/Tools/Flax.Build/Projects/VisualStudio/VisualStudioInstance.cs @@ -103,7 +103,7 @@ namespace Flax.Build.Projects.VisualStudio if (Environment.OSVersion.Platform == PlatformID.Win32NT) { - // Visual Studio 2017-2022 + // Visual Studio 2017-2026 List preReleaseInstallDirs = null; try { diff --git a/Source/Tools/Flax.Build/global.json b/Source/Tools/Flax.Build/global.json index d07970ac2..4ae80ef19 100644 --- a/Source/Tools/Flax.Build/global.json +++ b/Source/Tools/Flax.Build/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "10.0.100", "rollForward": "latestMajor" } } diff --git a/global.json b/global.json index d07970ac2..4ae80ef19 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "10.0.100", "rollForward": "latestMajor" } }