Confuser doesn't use the TypeForwardedToAttribute so the type resolution fails in case of forwarded member.
For example:
One .NET 4.0 assembly declaring a method: public static void MyClass.MyMethod(ICommand)
One .NET 4.5 assembly referencing the previous one and using: MyClass.MyMethod(command)
In that case member resolution fails for public static void MyClass.MyMethod because the Resolution Scope of the signature element ICommand is not the same (PresentationCore in the first assembly and System in the second one)
Here is the exception details:
Failed to resolve a member, check if all dependencies are of correct version.
Exception: dnlib.DotNet.MemberRefResolveException: Could not resolve method: CentiveSolutions.Controls.Wpf.SmallWindowIndeterminatedProgressContent CentiveSolutions.Controls.Wpf.SmallWindow::SetIndeterminatedProgress(System.String,System.Windows.Input.ICommand)
at dnlib.DotNet.MemberRef.ResolveMethodThrow() in d:\Open Source Projects\ConfuserEx\dnlib\src\DotNet\MemberRef.cs:line 417
at Confuser.Core.DnlibUtils.ResolveThrow(IMethod method) in d:\Open Source Projects\ConfuserEx\Confuser.Core\DnlibUtils.cs:line 173
at Confuser.Protections.ReferenceProxy.MildMode.ProcessCall(RPContext ctx, Int32 instrIndex) in d:\Open Source Projects\ConfuserEx\Confuser.Protections\ReferenceProxy\MildMode.cs:line 21
at Confuser.Protections.ReferenceProxy.ReferenceProxyPhase.ProcessMethod(RPContext ctx) in d:\Open Source Projects\ConfuserEx\Confuser.Protections\ReferenceProxy\ReferenceProxyPhase.cs:line 149
at Confuser.Protections.ReferenceProxy.ReferenceProxyPhase.Execute(ConfuserContext context, ProtectionParameters parameters) in d:\Open Source Projects\ConfuserEx\Confuser.Protections\ReferenceProxy\ReferenceProxyPhase.cs:line 108
at Confuser.Core.ProtectionPipeline.ExecuteStage(PipelineStage stage, Action`1 func, Func`1 targets, ConfuserContext context) in d:\Open Source Projects\ConfuserEx\Confuser.Core\ProtectionPipeline.cs:line 134
at Confuser.Core.ConfuserEngine.RunPipeline(ProtectionPipeline pipeline, ConfuserContext context) in d:\Open Source Projects\ConfuserEx\Confuser.Core\ConfuserEngine.cs:line 216
at Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in d:\Open Source Projects\ConfuserEx\Confuser.Core\ConfuserEngine.cs:line 160
Confuser doesn't use the
TypeForwardedToAttribute
so the type resolution fails in case of forwarded member.For example:
public static void MyClass.MyMethod(ICommand)
MyClass.MyMethod(command)
In that case member resolution fails for
public static void MyClass.MyMethod
because the Resolution Scope of the signature elementICommand
is not the same (PresentationCore
in the first assembly andSystem
in the second one)Here is the exception details: