Skip to content

Commit

Permalink
Bump AsmResolver to v6 beta
Browse files Browse the repository at this point in the history
The older versions cause a warning about System.Text.Json
vulnerabilities, which would propage to users of CelesteMod.Publicizer
  • Loading branch information
psyGamer committed Dec 27, 2024
1 parent 53801c2 commit a15ed7f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CelesteMod.Publicizer/CelesteMod.Publicizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.548"/>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.548"/>
<PackageReference Include="AsmResolver.DotNet" Version="5.0.0" />
<PackageReference Include="AsmResolver.DotNet" Version="6.0.0-beta.1" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions CelesteMod.Publicizer/CelestePublicizerTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
using AsmResolver.DotNet;
using AsmResolver.DotNet.Signatures;
using BepInEx.AssemblyPublicizer;
using FieldAttributes = AsmResolver.PE.DotNet.Metadata.Tables.Rows.FieldAttributes;
using MethodAttributes = AsmResolver.PE.DotNet.Metadata.Tables.Rows.MethodAttributes;
using TypeAttributes = AsmResolver.PE.DotNet.Metadata.Tables.Rows.TypeAttributes;
using FieldAttributes = AsmResolver.PE.DotNet.Metadata.Tables.FieldAttributes;
using MethodAttributes = AsmResolver.PE.DotNet.Metadata.Tables.MethodAttributes;
using TypeAttributes = AsmResolver.PE.DotNet.Metadata.Tables.TypeAttributes;

namespace CelesteMod.Publicizer;

Expand Down
4 changes: 2 additions & 2 deletions CelesteMod.Publicizer/FatalAsmResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using AsmResolver.DotNet.Serialized;
using AsmResolver.IO;
using AsmResolver.PE;
using AsmResolver.PE.DotNet.Builder;
using AsmResolver.PE.Builder;

namespace BepInEx.AssemblyPublicizer;

Expand Down Expand Up @@ -43,7 +43,7 @@ public static void FatalWrite(this ModuleDefinition module, string filePath)
var result = new ManagedPEImageBuilder().CreateImage(module);
if (result.HasFailed)
{
throw new AggregateException("Construction of the PE image failed with one or more errors.", result.DiagnosticBag.Exceptions);
throw new AggregateException("Construction of the PE image failed with one or more errors.", (result.ErrorListener as DiagnosticBag)?.Exceptions ?? []);
}

using var fileStream = File.Create(filePath);
Expand Down
3 changes: 1 addition & 2 deletions CelesteMod.Publicizer/OrigVisibilityAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
using AsmResolver.DotNet;
using AsmResolver.DotNet.Code.Cil;
using AsmResolver.DotNet.Signatures;
using AsmResolver.DotNet.Signatures.Types;
using AsmResolver.PE.DotNet.Cil;
using AsmResolver.PE.DotNet.Metadata.Tables.Rows;
using AsmResolver.PE.DotNet.Metadata.Tables;

namespace CelesteMod.Publicizer;

Expand Down

0 comments on commit a15ed7f

Please sign in to comment.