From 6dcf21d03e47f844d75576554ffdf802be593b02 Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Sat, 10 May 2025 19:39:50 +0700 Subject: [PATCH] make assembly names case-insensitive for the game context --- CringeBootstrap/GameDirectoryAssemblyLoadContext.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CringeBootstrap/GameDirectoryAssemblyLoadContext.cs b/CringeBootstrap/GameDirectoryAssemblyLoadContext.cs index 57e7d26..3eeafa3 100644 --- a/CringeBootstrap/GameDirectoryAssemblyLoadContext.cs +++ b/CringeBootstrap/GameDirectoryAssemblyLoadContext.cs @@ -10,7 +10,9 @@ public class GameDirectoryAssemblyLoadContext : AssemblyLoadContext, ICoreLoadCo { private readonly string _dir; private static readonly ImmutableHashSet ReferenceAssemblies = ["netstandard"]; - private readonly Dictionary _assemblyNames = []; + // Assembly simple names are case-insensitive per the runtime behavior + // (see SimpleNameToFileNameMapTraits for the TPA lookup hash). + private readonly Dictionary _assemblyNames = new(StringComparer.OrdinalIgnoreCase); public GameDirectoryAssemblyLoadContext(string dir) : base("CringeBootstrap") {