Skip to content

Evaluate dnlib upgrade from 3.6.0 to 4.x #70

Description

@mcpolo99

Goal

Evaluate upgrading dnlib from 3.5.0 to the latest 4.x release. dnlib is the core .NET metadata library that ConfuserEx depends on for all assembly reading, writing, and manipulation.

Why

  • dnlib 3.5.0 was released in 2022 — there may be bug fixes, performance improvements, and better .NET 6/8/10 support in 4.x
  • The .NET 10 retarget (Retarget GUI and CLI to .NET 10 #53) may benefit from a newer dnlib but should NOT be blocked by it
  • API changes between 3.x and 4.x need evaluation before upgrading

What Needs Investigation

  1. Changelog review — what changed between 3.5.0 and latest 4.x?
  2. Breaking API changes — any renamed/removed/changed methods that ConfuserEx uses?
  3. Our custom extensions — DnlibUtils.cs has extension methods on dnlib types. Do they still compile?
  4. Resolve/ResolveThrow behavior — any changes to the resolution API we heavily depend on?
  5. ModuleWriter changes — anti-tamper and packer hook into writer events. Any event API changes?
  6. AssemblyResolver changes — our ConfuserAssemblyResolver wraps dnlib's resolver. Any interface changes?
  7. netstandard2.0 compatibility — does dnlib 4.x still target netstandard2.0?

Approach

  • Do NOT combine with Retarget GUI and CLI to .NET 10 #53 (.NET 10 retarget) — keep it separate to isolate risk
  • Evaluate first, implement only if API changes are manageable
  • Full test suite must pass after upgrade

Related Issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions