Skip to content

Commit

Permalink
feat: [Diagnostics]常にLauncherと同じディレクトリ内のものを参照するように
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic9045 committed Mar 31, 2024
1 parent 19c45f0 commit 21fda98
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions AtsEx.Launcher/VersionSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,16 @@ public VersionSelector()
AppDomain.CurrentDomain.AssemblyResolve += (sender, e) =>
{
AssemblyName assemblyName = new AssemblyName(e.Name);
string path = Path.Combine(atsExAssemblyDirectory, assemblyName.Name + ".dll");
return File.Exists(path) ? Assembly.LoadFrom(path) : null;
switch (assemblyName.Name)
{
case "AtsEx.Diagnostics":
string diagnosticsPath = Path.Combine(rootDirectory, assemblyName.Name + ".dll");
return Assembly.LoadFrom(diagnosticsPath);

default:
string path = Path.Combine(atsExAssemblyDirectory, assemblyName.Name + ".dll");
return File.Exists(path) ? Assembly.LoadFrom(path) : null;
}
};

UpdateChecker.CheckUpdates();
Expand Down

0 comments on commit 21fda98

Please sign in to comment.