How to exclude a Method or a Class from in SmartAssembly 8

Hello guys,
I hope you are doing well, I have a question. Is it possible to exclude a class or a method from obfuscation in Smart Assembly 8?

I'm using C# and WinForms.

Best Regards
Tagged:

Answers

  • Hello Mohsen,

    Yes certainly, please use the 'DoNotObfuscate' attribute.
    You can find more details here
    https://documentation.red-gate.com/sa/using-custom-attributes

    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?
  • MohsenMohsen Posts: 3 New member
    edited July 27, 2022 8:08PM
    Hello dear Peter,

    Here is my code and using the [DoNotObfuscate] tag in the namespace and also I used the [DoNotObfuscate] tag in another form that I call this method.

    This is an Updater method to check if there is a new version of the software, get it.

    If I obfuscate it with Smart Assembly version 8, it calls the version number from the XML file link incorrectly, but everything works fine in Smart Assembly version 7.5.

    I don't know what the problem is and I'd like to use an updated version of Smart Assembly.

    Even excluded all classes containing this method, but it doesn't work.

    Best Regards
  • Do you happen to know if the v7 & v8 projects are using the same settings please?

     

    Without knowing exactly what obfuscation options you're using it's just an estimation presently, but if you're using string encoding that could potentially be an issue also and you can exclude the method from such in a similar manner as referenced in the same article. 

    If that fails, should wish to, we'll could create a support incident for you to share your project for us to examine?

    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?
  • MohsenMohsen Posts: 3 New member
    edited July 27, 2022 8:08PM
    Settings in v7 & v8 are the same.
    Yes, I'm using string encoding and most obfuscation methods with maximum levels.

    Sure, it's a good idea to check it out, and I'm even able to use TeamViewer or AnyDesk.
  • Noted, thank you; please could you attempt using the DoNotEncodeStrings custom attribute and if that we can dig into this further?

    https://documentation.red-gate.com/sa/using-custom-attributes 
    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.