From 4369b0b1cc252fdb61fb5a3c9bad4a1f5893290d Mon Sep 17 00:00:00 2001 From: CptMoore <39010654+CptMoore@users.noreply.github.com> Date: Thu, 13 Jun 2024 23:44:14 +0200 Subject: [PATCH] Fix for InjectorRunner not finding itself within the injector AppDomain --- ModTek.InjectorRunner/Injector/InjectorsAppDomain.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ModTek.InjectorRunner/Injector/InjectorsAppDomain.cs b/ModTek.InjectorRunner/Injector/InjectorsAppDomain.cs index c1ee7e7..0a1744b 100644 --- a/ModTek.InjectorRunner/Injector/InjectorsAppDomain.cs +++ b/ModTek.InjectorRunner/Injector/InjectorsAppDomain.cs @@ -1,4 +1,5 @@ using System; +using ModTek.Common.Globals; namespace ModTek.InjectorRunner.Injector; @@ -10,7 +11,11 @@ internal static void Run() { // this AppDomain allows us to unload all dlls used by the Injectors // also it enforces isolation to allow running injectors during project build time - var domain = AppDomain.CreateDomain(ModTekInjectorsDomainName); + var domain = AppDomain.CreateDomain(ModTekInjectorsDomainName, null, new AppDomainSetup + { + // for some reason InjectorRunner can't find itself within the newly created AppDomain otherwise + PrivateBinPath = Paths.ModTekLibDirectory + }); try { var @this = (InjectorsAppDomain)domain.CreateInstance(