PreEmptive DotFuscator: элемент с тем же ключом уже добавлен - PullRequest
1 голос
/ 24 апреля 2020

Мое приложение Xamarin работает правильно без запутывания. Однако процесс сборки завершается неудачно при использовании DotFuscator в версиях Professional и Community:

  1. с DotFuscator Professional Edition :

Я отредактировал свой android .csproj файл с конфигурациями, упомянутыми в официальных документах

https://www.preemptive.com/dotfuscator/pro/userguide/en/getting_started_protect.html#integrate -xamarin

Но при создании моего android проекта я получил эту ошибку:

2>  [Build Output] Reading debugging symbols for module 'NameSpace.dll'...
2>  [Build Output] Skipping sequence point because its offset does not point to an instruction: method '[NameSpace.dll] NameSpace.Views.SomePage::void InitializeComponent()', offset 0x0022
2>  [Build Output] Skipping sequence point because its offset does not point to an instruction: method '[NameSpace.dll] NameSpace.Views.AnotherPage::void InitializeComponent()', offset 0x0022
2>  [Build Output] Skipping sequence point because its offset does not point to an instruction: method '[NameSpace.dll] NameSpace.Views.AnotherPage::void InitializeComponent()', offset 0x0033
.
.
.
2>  [Build Output] Read debugging symbols for module 'NameSpace.dll'.
2>  [Build Output] Warning: When reading debugging symbols for module 'NameSpace.dll', one or more sequence points were invalid and were skipped. Debugging symbols emitted for this module may be incorrect.
2>  [Build Output] An item with the same key has already been added.
2>  [Build Output] Build Error.
с DotFuscator Community Edition :

Следуя инструкциям на https://www.preemptive.com/dotfuscator/ce/docs/help/getting_started_xamarin.html

Выдает эту ошибку

Error       The command ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\PreEmptiveSolutions\DotfuscatorCE\dotfuscatorCLI.exe" /p:InDir="obj\Release\100\DotfuscatorXamarin\dfin",OutDir="obj\Release\100\DotfuscatorXamarin\dfout",ReportDir="DotfuscatorReports\Release" "obj\Release\100\DotfuscatorXamarin\Template.dfconfig" /in:+"${configdir}\${InDir}\NameSpace.Android.dll",+"${configdir}\${InDir}\NameSpace.dll" /makeconfig:"DotfuscatorConfig.xml"" exited with code 1.  NameSpace.Android   D:\folder1\folder2\PreEmptive.Dotfuscator.Xamarin\PreEmptive.Dotfuscator.Xamarin.Targets    508

Error       The initial run of Dotfuscator failed (exit code '1'). A new Dotfuscator config file, 'DotfuscatorConfig.xml', has been generated, but may not build correctly.

Интересно, почему это происходит? и что такое правильное исправление?

Примечание: я пробовал обе версии на совершенно новых проектах Xamarin, и оба работали правильно (без ошибок + DotfuscatorReports создан).

...