From 9862fd966bcfb55910c68e137b7460aa81596224 Mon Sep 17 00:00:00 2001 From: Arne Kiesewetter Date: Fri, 16 Feb 2024 01:26:40 +0100 Subject: [PATCH] Fix embedding debug symbols into the nupkg (byebye snupkg) - and loading pdbs --- Directory.Build.props | 2 +- MonkeyLoader/Meta/LocationConfigSection.cs | 2 +- MonkeyLoader/Meta/NuGetPackageMod.cs | 4 ++-- MonkeyLoader/MonkeyLoader.csproj | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 4c08eea..eebaa46 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ enable true False - full + portable True true diff --git a/MonkeyLoader/Meta/LocationConfigSection.cs b/MonkeyLoader/Meta/LocationConfigSection.cs index a7487a3..22c79a4 100644 --- a/MonkeyLoader/Meta/LocationConfigSection.cs +++ b/MonkeyLoader/Meta/LocationConfigSection.cs @@ -17,7 +17,7 @@ public sealed class LocationConfigSection : ConfigSection public readonly DefiningConfigKey ConfigsKey = new("Configs", "Paths to check for configuration files.", () => "./MonkeyLoader/Configs", valueValidator: PathValidator); public readonly DefiningConfigKey GamePacksKey = new("GamePacks", "Paths to check for game packs.", () => "./MonkeyLoader/GamePacks", valueValidator: PathValidator); public readonly DefiningConfigKey LibsKey = new("Libs", "Paths to check for dependency libraries.", () => "./MonkeyLoader/Libs", valueValidator: PathValidator); - public readonly DefiningConfigKey> ModsKey = new("Mods", "Loading locations to check for mods.", () => new() { new ModLoadingLocation("./MonkeyLoader/Mods", true, "\\.disabled") }, valueValidator: locations => locations?.Count > 0); + public readonly DefiningConfigKey> ModsKey = new("Mods", "Loading locations to check for mods.", () => new() { new ModLoadingLocation("./MonkeyLoader/Mods", true, false, "\\.disabled") }, valueValidator: locations => locations?.Count > 0); public readonly DefiningConfigKey PatchedAssembliesKey = new("PatchedAssemblies", "Path to save pre-patched assemblies to. Set null to disable.", () => "./MonkeyLoader/PatchedAssemblies", valueValidator: PathValidator); private const string SetEventLabel = "Property"; diff --git a/MonkeyLoader/Meta/NuGetPackageMod.cs b/MonkeyLoader/Meta/NuGetPackageMod.cs index cd932df..32df92c 100644 --- a/MonkeyLoader/Meta/NuGetPackageMod.cs +++ b/MonkeyLoader/Meta/NuGetPackageMod.cs @@ -184,7 +184,7 @@ protected override bool OnLoadEarlyMonkeys() assemblyFile.CopyTo(assemblyStream); var mdbPath = prepatcherPath + ".mdb"; - var pdbPath = prepatcherPath.GetDirectory() / prepatcherPath.GetNameWithoutExtension()! / ".pdb"; + var pdbPath = prepatcherPath.GetDirectory() / $"{prepatcherPath.GetNameWithoutExtension()!}.pdb"; using var symbolStream = new MemoryStream(); if (FileSystem.FileExists(mdbPath)) @@ -243,7 +243,7 @@ protected override bool OnLoadMonkeys() assemblyFile.CopyTo(assemblyStream); var mdbPath = patcherPath + ".mdb"; - var pdbPath = patcherPath.GetDirectory() / patcherPath.GetNameWithoutExtension()! / ".pdb"; + var pdbPath = patcherPath.GetDirectory() / $"{patcherPath.GetNameWithoutExtension()!}.pdb"; using var symbolStream = new MemoryStream(); if (FileSystem.FileExists(mdbPath)) diff --git a/MonkeyLoader/MonkeyLoader.csproj b/MonkeyLoader/MonkeyLoader.csproj index d4d5953..8c60c6a 100644 --- a/MonkeyLoader/MonkeyLoader.csproj +++ b/MonkeyLoader/MonkeyLoader.csproj @@ -18,11 +18,11 @@ https://github.com/MonkeyModdingTroop/MonkeyLoader.git git mod; mods; modding; loader; harmony; unity; game; games; mono; config; configuration; nuget; logging; monkeyloader - True + False True snupkg - +