Repository navigation
Register the .NET install location in the Linux guide - #510
Conversation
Zaldaryon
left a comment
There was a problem hiding this comment.
Verified at 37b2be5 against this machine's installed tree. The apphost binary does carry /usr/share/dotnet as its compiled-in default root (strings on apphost shows the literal), so installing straight there means no registration file is needed, which is exactly the simplification the PR sells. The four search-path lines the warning hint shows match the host's own trace wording (Environment variable:, Registered location:, Default location: in the packaged singlefilehost), and the install_location_x64 note is right: hostfxr does look for the architecture-suffixed file, and dotnet-install.sh sets neither file, so both need to be written for the /usr/lib/dotnet alternative. TheArch note about pacman writing the location file itself is correct. Docs-only, one file, nothing else touched.
What changes
In
docs/get-started/installation/linux.md, right after the threedotnet-install.shcommands in the Debian/Ubuntu section:--install-dirto/usr/share/dotnet, the apphost's own compiled-in default, so there's nothing to register at all./usr/lib/dotnetas an alternative for anyone who wants the game's .NET kept separate, with a hint that registers it by writing both/etc/dotnet/install_locationand/etc/dotnet/install_location_x64, since newer hosts read the architecture-specific file instead of the plain one.sudo ln -s .../dotnet /usr/bin/dotnet, sodotnet --list-runtimesworks for checking.dotnet --list-runtimesshould listMicrosoft.NETCore.Appfor the major version the game needs.verbose.log, and mentions the per-Installation ENV variables field (Advanced section) as an alternative to the system-wide registration when the runtime lives somewhere else.In the Arch section, adds one sentence noting that
dotnet-runtimepackages register the install location themselves, so that step doesn't apply there. Fedora and a separate Ubuntuaptpath aren't covered by this doc, so nothing changed there.Why
A PikaOS (Debian-based) player followed this guide, installed .NET 7/8/10 with
dotnet-install.shinto/usr/lib/dotnet, and Vintage Story still could not find .NET 10 (dotnetwasn't onPATHeither). A separate copy of the game that bundled its own runtime ran fine, which is what pointed at the missing system-wide registration rather than a bad download.dotnet-install.shonly adds the install directory to the current shell'sPATHfor that session, and explicitly does not setDOTNET_ROOT:dotnet-install scripts reference
Vintage Story starts through its own apphost, not through the shell that ran the script, so that session-only
PATHchange never reaches it. The apphost resolves the runtime throughDOTNET_ROOT, then the registered install location, then its compiled-in default, in that order:.NET environment variables
Troubleshoot app launch failures
.NET distribution packaging
And the compiled-in default for Linux is
/usr/share/dotnet/, which is also the location the "framework not found" error reports as searched when nothing else is registered.None of that runs for a
dotnet-install.shinstall, which is why the game kept failing even thoughdotnet-install.shreported success.src/ipc/handlers/gameExecutionOutcome.tsrecognizes the host's own wording for this failure,"You must install or update .NET to run this application.", which matches what Microsoft's docs show the host prints.Update: a second PikaOS report came in from a player who had already applied this guide, writing
/etc/dotnet/install_location, and the game still failed on .NET 10.0.2. Theirverbose.loghad the apphost list exactly what it searched:It names
install_location_x64, notinstall_location: this host only checked (and only reported on) the architecture-specific file, so the plain one this guide wrote was invisible to it. Microsoft's troubleshoot-app-launch page confirms the arch-specific file exists (quoted above) but doesn't spell out precedence between the two on Linux; this apphost's own diagnostic output is the evidence that a recent host can skip the plain file entirely. The guide now writes both files when registering a custom location, and, since installing straight into the apphost's default/usr/share/dotnetneeds no registration file of either kind, leads with that instead.Checked
On this machine (dotnet installed system-wide, not via the script):
The missing file is expected here: the install root is
/usr/share/dotnet, the compiled-in default, and Microsoft's own docs say the file isn't needed in that case.Also ran
npm run format:checkon the branch, which passes.