Unable to load assembly obfuscation

This is the first time I'm working with a tofusator. My project is written in C # and .NET 3.5, it has a main program and some plugins; this is a piece of code that loads plugins:

// Load the file
Assembly asm = Assembly.LoadFile( pluginPath );

// Instantiate the types I need
foreach( Type type in asm.GetTypes() )
{
    ...
}

Now the problem is that if I was not confused, everything is fine, but when I use dotfuscator asm.GetTypes(), throw a ReflectionTypeLoadException which says

The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I worked for several hours with no results. Thanks in advance.

EDIT: After some research and debugging, I think this is a problem in the manifest because the reflection cannot see (or load) the types inside the assembly. I discovered obfuscation with Reflector, but everything seems fine.

+3
3

, , , ..

. , , , , .

+1

Authenticode? , , .

Dotfuscator ( , Authenticode), Community Edition, Dotfuscator.

+1

I don't think Obfuscation works well with reflection. In fact, I think number one is being traded using obfuscation.

See this link for how to overcome the types that need to be mirrored.

0
source

Source: https://habr.com/ru/post/1777569/


All Articles