Search code examples
visual-studio-2017add-insetup-projectexcel-addinscrypto-obfuscator

Obfuscating Excel Add-in using LogicNP CryptoObfuscator


Id use the LogicNP tag, but it has to be created and I don't have the reputation.

I am trying to obfuscate Excel add-in code before I ship it to a customer and I am having problems installing the obfuscated add-in but no problems installing the clean add-in.

The items that relate to the obfuscation/final installation of my code:

  • I am using LogicNP's Crypto Obfuscator visual studio build integration
  • I use Add-in Express to do the install during setup

The package works out of the box without obfuscation. I wonder if there are any options within Crypto Obfuscator that are preventing my add-in from working. (Picture of settings attached.) My crypto obfuscator settings


Solution

  • It was a settings issue.

    I had to check Non-Public Only: For Libraries and ASP .NET Apps Un-check everything from the Optimizations tab, Encrypt Constant Values/Arrays, Encrypt and Virt MSIL Code, external methods and internal methods which are not renamed.

    Code pattern Masking had to be turned off, and the Control Flow Obfus level had to be set to medium. I wish I had reasons why each worked, I just messed around with the settings until it worked.