Ensure native game DLLs are discoverable under .NET 10 (Interim launcher)#38
Open
shihan42 wants to merge 1 commit intoSpaceGT:mainfrom
Open
Ensure native game DLLs are discoverable under .NET 10 (Interim launcher)#38shihan42 wants to merge 1 commit intoSpaceGT:mainfrom
shihan42 wants to merge 1 commit intoSpaceGT:mainfrom
Conversation
Under .NET (Core/10) on Windows, native DLL resolution does not implicitly probe the game directory. This can cause Interim.exe to fail with DllNotFoundException (e.g. Havok.dll) on some systems. On many systems, the native DLL search path is implicitly satisfied by the environment. Explicitly add the game directory to the native DLL search path before starting Space Engineers.
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.
Summary
This PR ensures that native game DLLs are discoverable when launching Space Engineers via
Interim.exeunder .NET 10 and Windows.Background
Under .NET (Core/10) on Windows, native DLL resolution does not implicitly probe the game directory. As a result,
Interim.execan fail with aDllNotFoundException(for example when loadingHavok.dll) on some systems.On many Windows systems, this issue does not surface because the native DLL search path is implicitly satisfied by the execution environment (e.g. PATH entries, launch context, prior native loads, etc.).
Fix
Explicitly add the game directory to the native DLL search path before starting Space Engineers when running under
NETCOREAPP.This makes native DLL resolution explicit and deterministic across environments, without changing behavior for the legacy launcher.
Scope
Interim.exeon Windows onlyLegacy.exeContext
This PR is based on the debugging discussion in Discord regarding an
Interim.exestartup crash caused by missing native DLLs.Discussion in Discord: https://discord.com/channels/1378756728107040829/1467840378056081552
Diagnostic evidence is available if needed.