mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Consolonia's Unix.Terminal uses [DllImport("libcoreclr.so")] to load
dlopen/dlsym on .NET Core. It ships a SetDllImportResolver that maps
the library name to the current process handle, but the resolver is
guarded by #if NET6_0 (exact TFM match) instead of NET6_0_OR_GREATER.
Since Consolonia targets net8.0, the resolver is never compiled in.
On self-contained single-file publishes, libcoreclr.so is bundled
inside the host binary and does not exist on disk. Without the
resolver the OS linker cannot find it, causing a DllNotFoundException
that crashes the TUI on startup. This primarily affects ARM64 Linux
users (e.g. Raspberry Pi / Debian Trixie) who almost exclusively use
self-contained publishes.
This commit registers an AssemblyLoadContext.Default.ResolvingUnmanagedDll
handler in Program.Main (before TUI init) that returns (IntPtr)(-1) for
libcoreclr.so, which the runtime interprets as the current process.
This is a temporary workaround until the upstream fix lands:
https://github.com/Consolonia/Consolonia/pull/605
Made-with: Cursor
|
||
|---|---|---|
| .. | ||
| ChatBots | ||
| CommandHandler | ||
| Commands | ||
| config | ||
| Crypto | ||
| Inventory | ||
| Logger | ||
| Mapping | ||
| Physics | ||
| Properties | ||
| Protocol | ||
| Proxy | ||
| Resources | ||
| Scripting | ||
| Tui | ||
| WinAPI | ||
| Achievement.cs | ||
| AutoTimeout.cs | ||
| ClassicConsoleBackend.cs | ||
| ColorHelper.cs | ||
| Command.cs | ||
| ConsoleIO.cs | ||
| ExtensionMethods.cs | ||
| FileMonitor.cs | ||
| IConsoleBackend.cs | ||
| INIFile.cs | ||
| Json.cs | ||
| LegacyAchievementCatalog.cs | ||
| McClient.cs | ||
| MinecraftClient.csproj | ||
| Program.cs | ||
| RecipeBookRecipeEntry.cs | ||
| Settings.cs | ||
| TaskWithDelay.cs | ||
| TaskWithResult.cs | ||
| UpgradeHelper.cs | ||