diff --git a/BepInEx.Core/BepInEx.Core.csproj b/BepInEx.Core/BepInEx.Core.csproj index f98440d..4bb695d 100644 --- a/BepInEx.Core/BepInEx.Core.csproj +++ b/BepInEx.Core/BepInEx.Core.csproj @@ -19,7 +19,7 @@ bin\$(Configuration)\ - x86 + AnyCPU MinimumRecommendedRules.ruleset portable diff --git a/BepInEx.NetLauncher/BepInEx.NetLauncher.csproj b/BepInEx.NetLauncher/BepInEx.NetLauncher.csproj index 39c7698..a1cf0bc 100644 --- a/BepInEx.NetLauncher/BepInEx.NetLauncher.csproj +++ b/BepInEx.NetLauncher/BepInEx.NetLauncher.csproj @@ -10,12 +10,14 @@ full - ..\bin\net\ + bin\Debug + x86 portable ..\bin\NetLauncher\ + x86 diff --git a/BepInEx.NetLauncher/NetPreloader.cs b/BepInEx.NetLauncher/NetPreloader.cs index 7fce323..d81997f 100644 --- a/BepInEx.NetLauncher/NetPreloader.cs +++ b/BepInEx.NetLauncher/NetPreloader.cs @@ -18,7 +18,7 @@ namespace BepInEx.NetLauncher public static void Start(string[] args) { - if (ConfigEntrypointExecutable.Value == null) + if (string.IsNullOrEmpty(ConfigEntrypointExecutable.Value)) { Log.LogFatal($"Entry executable was not set. Please set this in your config before launching the application"); Program.ReadExit(); diff --git a/BepInEx.NetLauncher/Program.cs b/BepInEx.NetLauncher/Program.cs index 021bcd2..bc05ff0 100644 --- a/BepInEx.NetLauncher/Program.cs +++ b/BepInEx.NetLauncher/Program.cs @@ -12,25 +12,14 @@ namespace BepInEx.NetLauncher internal static class NetPreloaderRunner { internal static void PreloaderMain(string[] args) - { - PlatformUtils.SetPlatform(); - - Logger.Listeners.Add(new ConsoleLogListener()); - - ConsoleManager.Initialize(true); - - NetPreloader.Start(args); - } - - internal static void OuterMain(string[] args, string filename) { try { - Paths.SetExecutablePath(filename); + Logger.Listeners.Add(new ConsoleLogListener()); - AppDomain.CurrentDomain.AssemblyResolve += LocalResolve; + ConsoleManager.Initialize(true); - PreloaderMain(args); + NetPreloader.Start(args); } catch (Exception ex) { @@ -40,6 +29,15 @@ namespace BepInEx.NetLauncher } } + internal static void OuterMain(string[] args, string filename) + { + Paths.SetExecutablePath(filename); + + AppDomain.CurrentDomain.AssemblyResolve += LocalResolve; + + PreloaderMain(args); + } + private static Assembly LocalResolve(object sender, ResolveEventArgs args) { var assemblyName = new AssemblyName(args.Name); @@ -72,8 +70,6 @@ namespace BepInEx.NetLauncher { try { - Console.WriteLine("test"); - string filename; #if DEBUG