unable to obfuscate members in class library

pboyvbpboyvb Posts: 2 New member
edited June 14, 2018 10:01PM in SmartAssembly
I have a class library that I need to obfuscate. The .dll is self-contained. It is used by another application as a plugin. I have static methods in various classes that need to be obfuscated. During my research, I learned that public members in libraries are not obfuscated. But now there seems to be an attribute override available to disable this automatic feature. I tried this attribute, and it seemingly does nothing for me. I am still able to view the code after the .dll is compiled. Below is an example of how I am trying to use the attribute.

[ForceObfuscate]
class Edges
{
     [ForceObfuscate]
     public static PleaseObfuscateMe()
     {
         ... important code
     }
}

The only way I've been able to get SmartAssembly to obfuscate my code is by using the strong name signing option. Unfortunately, this will break my plugin, because the .dll files I reference for the main application that runs my plugin does not use strong naming. I'm a self-taught coder, so I can entirely admit that this problem is probably due to my lack of understanding of something, but I would greatly appreciate any help on this!

Edit:
I have also tried modifying the .saproj file:
The important bit is the addition of ExcludePublicMembers="0" 

          <Assembly AssemblyName="MyCoolClassLibrary, Culture=neutral, PublicKeyToken=null">
                <Embedding />
                <Merging>
                    <ResourcesCompression />
                    <MemberRefsProxy />
                    <Pruning Prune="1">
                        <Exclusion />
                    </Pruning>
                    <Obfuscation ExcludePublicMembers="0" Obfuscate="1">
                        <Exclusion />
                    </Obfuscation>
                    <ControlFlow Obfuscate="1" />
                </Merging>
            </Assembly>

Thanks

Answers

Sign In or Register to comment.