Repository navigation
Use a newer .NET in your game without waiting for a new Game Studio - #3440
Merged
Merged
Conversation
…tor on, with a generated runtimeconfig relaunch Also the per-install host instance mutex and the selector tests.
…rt primitive for every restart path Also a per-install taskbar identity for the re-executed process, the runtime in the window and progress titles, and the runtime version in crash reports.
…s newer than the compiler's own
…ees a re-executed editor Also: stride new/upgrade run the asset compiler on the session's major, the CLI locates the compiler dll instead of its apphost, and dev-redirect versions find the editor under bin/<Configuration>.
… instead of regex edits
…r is found without an env var
…d a single editor framework
…erences when that one is installed
xen2
force-pushed
the
feature/multitarget-future-tfm
branch
from
September 15, 2026 08:53
6137f81 to
c14f209
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Game Studio 4.4 is built for .NET 10. Until now, a game had to target the same .NET version as the editor: move your game to .NET 11, and Game Studio could not load it anymore.
With this PR, you can move your game to .NET 11 (or any later version) and keep using the same Game Studio. When a project needs a newer .NET, Game Studio restarts itself on it. The asset compiler does the same during
dotnet build.Related issues
DOTNET_ROLL_FORWARD=LatestMajorworkaround is not needed anymore. The first part (the MSBuild lookup when the editor's runtime has no matching SDK installed) is unchanged.What you can do
Move your game to .NET 11
<TargetFramework>in your game projects tonet11.0.Game Studio notices that the project needs .NET 11 and restarts on it. The window title shows the .NET version it runs on, together with the graphics API:
Opening another project later (File > Open, File > New) switches back and forth between .NET 10 and .NET 11 as each project needs.
dotnet buildof the game runs the asset compiler on .NET 11 too.Get a clear message when .NET is missing
If the project needs a .NET version that is not installed, Game Studio tells you what is missing and where to get it, then returns to the project selection window:
Try Game Studio on a newer .NET from the launcher
When a newer .NET is installed, the launcher shows a runtime selector below the version. The default is the editor's own .NET, and each newer version is offered as a minimum:
A project that needs a newer version always gets it. The selector only appears for Stride versions that support it, so older versions work as before. With only one .NET installed, it stays hidden.
Note: it's the same selector we had a long time ago when we had both .NET Framework and .NET Core side by side.
Same from the command line
Start with only a newer .NET installed
Game Studio, the launcher, the CLI and the asset compiler now start even when .NET 10 is not installed, as long as a newer version is. When .NET 10 is installed, they keep using it.
How it works
Choosing the .NET version
DotNetHostSelector(insources/shared/Stride.NuGetResolver, used by Game Studio, the launcher and the CLI) picks the .NET major from:TargetFramework(s)entry, fromobj/project.assets.jsonor the csproj. A minimum.--framework net11.0orSTRIDE_RUNTIME_MAJOR(launcher choice, CLI)global.jsonSDK pinThe editor never runs below its own major. When a newer major is needed, the selector writes the editor's runtimeconfig re-pointed at that major under
%LOCALAPPDATA%\stride\hostand restarts throughdotnet exec --runtimeconfig <file> ... --host-relaunched.Game Studio
dotnet.exeprocess. It gets a per-install taskbar identity and the Stride icon, so it does not show as ".NET Host", and no console window opens.Asset compiler
Stride.AssetCompiler.runtimeconfig.template.json, written at build time by the SDK's ownGenerateRuntimeConfigurationFilestask with every framework at{MAJOR}.0.0-0andLatestMinor, so previews and releases of a major are both found.Stride.AssetCompiler.targetscompares the project's major with the compiler's. When the project's is newer, it fills{MAJOR}with one literalReplace, writes the file underobj/, and runs the compiler throughdotnet exec --runtimeconfig. No JSON editing in MSBuild, no environment variable.Tools
RollForward=Majoron Game Studio, the launcher, the CLI and the asset compiler.Launcher and CLI
dotnet exec, through a per-install named mutex.stride studio --frameworkis dropped for older editors.stride newandstride upgraderun the asset compiler on the session's major.Also in this PR
Testing
Stride.Launcher.Tests(decision table, first-target-framework rule,global.jsonpin, explicit choice as a minimum, missing runtime and SDK messages, runtimeconfig rewrite, editor capability scan).stride studiowith an older editor (beta6). Starting with only a newer .NET installed was checked with a small app using the sameRollForward=Majorsetting, not with Game Studio itself.msbuild.exe, and the compiler slave path (no production command starts slaves today).Known limitations