Add comment in regards to the attaching of event handler to the assembly lookup event before call to loadUserRulesets().

This commit is contained in:
Lucas A 2020-04-19 15:25:21 +02:00
parent a7179d1c87
commit ba1c465edf
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@ public RulesetStore(IDatabaseContextFactory factory, Storage storage = null)
// We cannot read assemblies from cwd, so should check loaded assemblies instead.
loadFromAppDomain();
loadFromDisk();
// the event handler contains code for resolving dependency on the game assembly for rulesets located outside the base game directory.
// It needs to be attached to the assembly lookup event before the actual call to loadUserRulesets() else rulesets located out of the base game directory will fail
// to load as unable to locate the game core assembly.
AppDomain.CurrentDomain.AssemblyResolve += resolveRulesetDependencyAssembly;
loadUserRulesets();
addMissingRulesets();