Skip to content

The obfused dll cannot be load: Method 'x' in type 'xx' from assembly 'xxx' does not have an implementation #306

@Anthony-GitHub

Description

@Anthony-GitHub

Hi,

ConfuserExTest.zip

This demo can reproduce the issue. There are 2 projects in this solution:

  1. RenameBug1: A .NET class library that will be obfuscated with ConfuserEx. I use the Post-Build event to use ConfuserEx with configuration file ConfuserExTest\RenameBug1\confuserex.crproj. You may need to update the path for Confuser.CLI.exe in the Post-Build event.

  2. ConfuserExDotNetBug: This is a test console app that uses the dll in part 1.

If I use the unobfuscated dll, then the console app works. If I use the obfuscated dll, then it will fail at runtime with error:

Test 'M:ConfuserExDotNetBug.Class1.Main' failed: Method 'FireLog' in type '_B._d' from assembly 'RenameBug1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
	System.TypeLoadException: Method 'FireLog' in type '_B._d' from assembly 'RenameBug1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
	at _B._f..ctor()
	RenameTest.cs(12,0): at test.Rename.PublicClass2..ctor()
	Class1.cs(6,0): at ConfuserExDotNetBug.Class1.Main()

It seems the method FireLog is renamed unintended.

I test this with the latest stable ConfuserEx 1.4.1

Thanks
Anthony

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions