问题
I began to use Dotfuscator Community (fresh download) with Visual Studio 2019 integration as part of my Xamarin.Forms build process.
I did the steps listed under: preemptive
When I build, I get the correct build messages from Dotfuscator.
My problem is, that
- while Dotfuscator obfuscates the resulting assembly of the shared project, which I can verify by opening the .dll file with ILSpy in the Release's folder, the "same" dll inside the resulting APK is not obfuscated which I can verify by unzipping the APK and opening the shared projects .dll assembly with ILSpy.
- Another problem of mine is, that the -otherwise very good and detailed- Xamarin.Forms obfuscation process description on preemptive.com does not detail the APK archivation process especially in the regards of where(*) the APK with the obfuscated assemblies will be placed and how to make sure that the "Archive" command in Visual Studio actually uses the right APK file.
- I dont see any smart obfuscator reports which were mentioned in the guide (the Renaming.xml is still in the folder)
(*) APK folders: There are two folders Visual Studio places APKs from the same build config:
- This seems to be the main location which is opened directly from the "Archives" menu.
C:\Users\Me\AppData\Local\Xamarin\Mono for Android\Archives\2019-08-27\Ch9.Android 8-27-19 6.00 PM.apkarchive
- This is the folder for the build config designated for obfuscation:
c:\PROG\Ch9\Ch9\Ch9.Android\bin\DotfuscatedGPlayRelease\
- Edit1: I have just confirmed that the two APKs in the above locations are identical by content (Totalcommander comapre)
- Edit2: I have just rechecked/confirmed that the .dll file (assembly) inside the two identical APK-s (described above) is not identical with the stand alone obfuscaed .dll file inside
c:\PROG\Ch9\Ch9\Ch9.Android\bin\DotfuscatedGPlayRelease\
folder
_EDIT 2019.08.28____________________
I have tried to run the Dotfuscator prepared build config on Visual Studio 2017 (15.9.14, yes that's an older one) and can confirm, that the APK package prepared by the "Archive" command contains the dotfuscated assemblies. So at this point it seems that the archive process of VS19 circumvents the dotfuscated assemblies while VS17 works correctly in this regard
回答1:
The faulty behavior has been corrected, see comment section.
来源:https://stackoverflow.com/questions/57679053/dotfuscator-obfuscates-stand-alone-assembly-but-not-the-apk-archive