0

I am trying to protect my wpf application with SmartAssembly. I have problem because exe created by SmartAssembly don't work propertly. When I run app I see white screen and app is not responding. Depending of configuration sometimes app is closing. Under some SA configurations application is not responding for about 2 minutes (durning that time it uses a lot of CPU and RAM). After 2 minutes it starts to response but without any navigations between views. I tried many configurations (even without any protection selected), and so far couldn't make it work. In my opinion problem is in loading Prism modules because in reports I get many

Prism.Regions.Behaviors.RegionCreationException
MicrosoftPractices.Unity.ResolutionFailedException

Could you tell me how should i configure project to make it work?

Thanks in advance for help

Maciek
  • 61
  • 1
  • 8
  • You cannot use code obfuscation tools with Prism, because Prism heavily uses Reflection. The Prism Framework tries to look for classes and properties with particular names, but since the obfuscation tool changes them, that fails. A `ResolutionFailedException` is a sign of this fact. – dymanoid Sep 13 '17 at 09:24
  • I have generated file with other tool, .NetReactor, and the works fine. So are you sure that it is not possible to configure SmartAssembly. I have to use SA because we have no license for other tool. – Maciek Sep 13 '17 at 10:09
  • This depends on the tool. Some obfuscators can handle some reflection based and XAML things, the others - not. But in general, there will always be a risk of breaking something in a reflection based code when using obfuscation. – dymanoid Sep 13 '17 at 10:14
  • obfuscation can break your code so you allways need to validate your soft against the abfuscated version. After that NR is perhaps less obfuscating and you need to adjust the options of SA so it does not break all.. By the way, I don't think that obfuscation can break Prism or any IOC components. Good luck – GCamel Sep 13 '17 at 12:12
  • I'm trialing BabelFor at the moment and the basic rules applied aren't breaking my Prism/WPF app. I've just contacted support as I cannot get the public renaming working but a) I'm not sure I want to b) the trial cannot handle XAML obfuscation. Only the licensed version can. – Jammer Mar 22 '20 at 20:07

0 Answers0