Closed mczhao1977 closed 2 years ago
This is very difficult to say, based on the information provided. I'm guessing some protection is active that doesn't work well with the Android target. What are the obfuscation settings used in this case?
This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!
Closing this issue because it needs more information and has not had recent activity. Please re-open this issue if more details can be provided. Thanks!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Steps to Reproduce:
I add one target in my csproj file to call ConfuserEx CLI to obfuscate the code after assembly built. The ConfuserEx successfully processed the assembly but the subsequence target _LinkAssembliesShrink failed with following error: XALNK7000: Mono.Linker.MarkException: Error processing method: 'System.Void demo.Pages.TestingPage::_B7m7Lms8Dbak5MgE0S8fg8CIYJuA()' in assembly: 'demo.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void demo.Pages.TestingPage::skPreview_PaintSurface(System.Object,SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs) at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference) at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference) at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction) at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method) at Mono.Linker.Steps.MarkStep.ProcessQueue() --- End of inner exception stack trace --- at Mono.Linker.Steps.MarkStep.ProcessQueue() at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue() at Mono.Linker.Steps.MarkStep.Process() at Mono.Linker.Steps.MarkStep.Process(LinkContext context) at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context) at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step) at Mono.Linker.Pipeline.Process(LinkContext context) at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) at Xamarin.Android.Tasks.LinkAssemblies.RunTask()
It seems linking process can't find some obfuscated method. So what's the best point to insert the obfuscation target?
Thanks