Skip to content

Commit

Permalink
Fix embedding debug symbols into the nupkg (byebye snupkg) - and load…
Browse files Browse the repository at this point in the history
…ing pdbs
  • Loading branch information
Banane9 committed Feb 16, 2024
1 parent a540fc1 commit 9862fd9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<Deterministic>true</Deterministic>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<DebugType>portable</DebugType>
<GenerateDocumentationFile>True</GenerateDocumentationFile>

<CopyToLibraries Condition="'$(CopyToLibraries)'==''">true</CopyToLibraries>
Expand Down
2 changes: 1 addition & 1 deletion MonkeyLoader/Meta/LocationConfigSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class LocationConfigSection : ConfigSection
public readonly DefiningConfigKey<string> ConfigsKey = new("Configs", "Paths to check for configuration files.", () => "./MonkeyLoader/Configs", valueValidator: PathValidator);
public readonly DefiningConfigKey<string> GamePacksKey = new("GamePacks", "Paths to check for game packs.", () => "./MonkeyLoader/GamePacks", valueValidator: PathValidator);
public readonly DefiningConfigKey<string> LibsKey = new("Libs", "Paths to check for dependency libraries.", () => "./MonkeyLoader/Libs", valueValidator: PathValidator);
public readonly DefiningConfigKey<List<ModLoadingLocation>> ModsKey = new("Mods", "Loading locations to check for mods.", () => new() { new ModLoadingLocation("./MonkeyLoader/Mods", true, "\\.disabled") }, valueValidator: locations => locations?.Count > 0);
public readonly DefiningConfigKey<List<ModLoadingLocation>> 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<string> PatchedAssembliesKey = new("PatchedAssemblies", "Path to save pre-patched assemblies to. Set null to disable.", () => "./MonkeyLoader/PatchedAssemblies", valueValidator: PathValidator);

private const string SetEventLabel = "Property";
Expand Down
4 changes: 2 additions & 2 deletions MonkeyLoader/Meta/NuGetPackageMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions MonkeyLoader/MonkeyLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<RepositoryUrl>https://github.com/MonkeyModdingTroop/MonkeyLoader.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>mod; mods; modding; loader; harmony; unity; game; games; mono; config; configuration; nuget; logging; monkeyloader</PackageTags>
<IncludeSymbols>True</IncludeSymbols>
<IncludeSymbols>False</IncludeSymbols>
<EmbedAllSources>True</EmbedAllSources>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<!-- Exclude the output of source generators from the compilation -->
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
Expand Down

0 comments on commit 9862fd9

Please sign in to comment.