You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Obfuscar unnecessarily renames methods that are implemention of some external interface. I get an exception:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Method 'GetObjectData' in type 'A.e' from assembly 'X, Version=2.10.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
For example, I have TestSerializable which implements ISerializable from System.Runtime.dll
namespace Test
{
public class TestSerializable : ISerializable
{
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
}
}
}
After obfuscation (without any error) I get:
for .NET 7 (assembly X.dll)
[X]Test.TestSerializable -> [X]A.e
{
[X]Test.TestSerializable::GetObjectData[2]( [System.Runtime]System.Runtime.Serialization.SerializationInfo, [System.Runtime]System.Runtime.Serialization.StreamingContext ) -> A
[X]Test.TestSerializable::.ctor[0]( ) skipped: special name
}
GetObjectData method should be skipped but is renamed to A!
for .Net Framework (assembly X.exe)
[X]Test.TestSerializable -> [X]A.e
{
[X]Test.TestSerializable::GetObjectData[2]( [mscorlib]System.Runtime.Serialization.SerializationInfo, [mscorlib]System.Runtime.Serialization.StreamingContext ) skipped: external base class or interface
[X]Test.TestSerializable::.ctor[0]( ) skipped: special name
}
Renaming GetObjectData was skipped, OK.
To fix this I have added System.Runtime.dll path to AssemblySearchPath:
Obfuscar unnecessarily renames methods that are implemention of some external interface. I get an exception:
For example, I have
TestSerializable
which implements ISerializable fromSystem.Runtime.dll
After obfuscation (without any error) I get:
X.dll
)GetObjectData
method should be skipped but is renamed toA
!X.exe
)Renaming
GetObjectData
was skipped, OK.To fix this I have added
System.Runtime.dll
path to AssemblySearchPath:The text was updated successfully, but these errors were encountered: