Skip to content

Commit

Permalink
Fix for InjectorRunner not finding itself within the injector AppDomain
Browse files Browse the repository at this point in the history
  • Loading branch information
CptMoore committed Jun 13, 2024
1 parent 352c1ae commit 4369b0b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ModTek.InjectorRunner/Injector/InjectorsAppDomain.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using ModTek.Common.Globals;

namespace ModTek.InjectorRunner.Injector;

Expand All @@ -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(
Expand Down

0 comments on commit 4369b0b

Please sign in to comment.