Error trying to confuse Xamarin.android dll with ConfuserEx

I am trying to confuse Xamarin.Android dlls using ConfuserEx, but I only get the error:

[ERROR] Failed to resolve dependency of 'app.dll'.
Exception: dnlib.DotNet.AssemblyResolveException: Could not resolve assembly: Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
   w dnlib.DotNet.Extensions.ResolveThrow(IAssemblyResolver self, IAssembly assembly, ModuleDef sourceModule) w E:\Source\Public\Confuser2\dnlib\src\DotNet\IAssemblyResolver.cs:wiersz 113
   w Confuser.Core.ConfuserEngine.Inspection(ConfuserContext context) w e:\Source\Public\Confuser2\Confuser.Core\ConfuserEngine.cs:wiersz 264
Failed at 20:23, 0:01 elapsed.

My confuserEx project file:

<project outputDir="C:\Users\Admin\Desktop\android\app\Confused" baseDir="C:\Users\Admin\Desktop\android\app" xmlns="http://confuser.codeplex.com">
  <packer id="compressor" />
  <module path="obj\Debug\app.dll">
    <rule pattern="true" preset="normal">
      <protection id="rename" />
      <protection id="anti ildasm" />
      <protection id="anti tamper" />
      <protection id="constants" />
      <protection id="ctrl flow" />
    </rule>
  </module>
  <probePath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0</probePath>
  <probePath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0</probePath>
</project>

How can I add a dependency for a project? What do I need to add to the project?

Thanks in advance

+4
source share
1 answer

You need to specify the correct path containing Xamarin.Android.Support.v4.dll, since it was not found in the Microsoft \ Framework \ MonoAndroid \ vX.Y paths that you already specified using probePath elements.

Xamarin.Android.Support.v4 NuGet, "packages", :

<probePath>packages/Xamarin.Android.Support.v4.23.4.0.1/lib/MonoAndroid403/</probePath>

IDE , Xamarin.Android.Support.v4 obj/Debug, :

<probePath>obj/Debug</probePath>

, " " , .

0

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


All Articles