Question

I use Crypto Obfuscator on my .NET projects and I wanted to use the "Obfuscation Rules" to exclude some class from obfuscation, but seems not to work.

First of all, I tried to use the ObfuscationAttribute in this way:

<ObfuscationAttribute(ApplyToMembers:=True, Exclude:=True)> _
Public Class DynamicClass
Public Overrides Function ToString() As String
    Dim props = Me.GetType().GetProperties(BindingFlags.Instance Or BindingFlags.Public)
    Dim sb As New StringBuilder()
    sb.Append("{")
    For i As Integer = 0 To props.Length - 1
        If (i > 0) Then sb.Append(", ")
        sb.Append(props(i).Name)
        sb.Append("=")
        sb.Append(props(i).GetValue(Me, Nothing))
    Next i
    sb.Append("}")
    Return sb.ToString()
End Function
End Class

but Crypto Obfuscator continues to obfuscate everything and display always the warning for method "ToString".

Then I tried to add an explicit obfuscation rule from Crypto Obfuscator:

Do Not Obfuscate, Applies To:{Classes}, Visibility:{All}, Name Matching: "ct:DynamicClass"

but also in this way not work.

Where I'm wrong? I have to enable some special settings to make it work?

Someone can help me?

Was it helpful?

Solution

Forget it...

I use Crypto Obfuscator 2012 R2 Professional and the problem is related to the limitations imposed by "Professional" license; now I've tested a trial of Crypto Obfuscator 2013 R2 Enterprise and it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top