summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Installer/Program.cs')
-rw-r--r--src/SMAPI.Installer/Program.cs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/SMAPI.Installer/Program.cs b/src/SMAPI.Installer/Program.cs
index 375678d2..ad5cf47f 100644
--- a/src/SMAPI.Installer/Program.cs
+++ b/src/SMAPI.Installer/Program.cs
@@ -2,7 +2,6 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
-using StardewModdingAPI.Internal;
namespace StardewModdingApi.Installer
{
@@ -14,8 +13,7 @@ namespace StardewModdingApi.Installer
*********/
/// <summary>The absolute path to search for referenced assemblies.</summary>
[SuppressMessage("ReSharper", "AssignNullToNotNullAttribute", Justification = "The assembly location is never null in this context.")]
- private static string DllSearchPath;
-
+ private static readonly string DllSearchPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "smapi-internal");
/*********
** Public methods
@@ -25,10 +23,6 @@ namespace StardewModdingApi.Installer
public static void Main(string[] args)
{
// set up assembly resolution
- string installerPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
- Program.DllSearchPath = EnvironmentUtility.DetectPlatform() == Platform.Windows
- ? Path.Combine(installerPath, "internal", "Windows", "smapi-internal")
- : Path.Combine(installerPath, "smapi-internal");
AppDomain.CurrentDomain.AssemblyResolve += Program.CurrentDomain_AssemblyResolve;
// launch installer