diff --git a/MoonWorks.csproj b/MoonWorks.csproj index 2b68c6d7..9346bc8c 100644 --- a/MoonWorks.csproj +++ b/MoonWorks.csproj @@ -1,7 +1,7 @@ - net7.0 + net7.0 x64 true 11 @@ -22,6 +22,7 @@ PreserveNewest + Never diff --git a/src/MoonWorksDllMap.cs b/src/MoonWorksDllMap.cs index c030adbe..9cd0f90a 100644 --- a/src/MoonWorksDllMap.cs +++ b/src/MoonWorksDllMap.cs @@ -97,16 +97,12 @@ namespace MoonWorks // Get the path to the assembly Assembly assembly = Assembly.GetExecutingAssembly(); - string assemblyPath = ""; - if (assembly.Location != null) - { - assemblyPath = Path.GetDirectoryName(assembly.Location); - } + string assemblyPath = System.AppContext.BaseDirectory; // Locate the config file string xmlPath = Path.Combine( assemblyPath, - assembly.GetName().Name + ".dll.config" + "MoonWorks.dll.config" ); if (!File.Exists(xmlPath)) {