Issues when using reflection and Obfuscation

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Issues when using reflection and Obfuscation

Postby mattwilkinson » Thu Nov 07, 2013 12:41 pm

I am using reflection in my classes to report the classname and method name when an error occurs:

Code: Select all
Try
            Dim i As Integer = 0
            Dim s As String = "wibble"
            i = CInt(s)
        Catch ex As Exception
            ThrowExceptionEx(My.Application.Info.AssemblyName, MethodBase.GetCurrentMethod.DeclaringType.Name, MethodBase.GetCurrentMethod().Name, ex)
        End Try
    End Sub


But when I obfuscate the code the
Code: Select all
MethodBase.GetCurrentMethod.DeclaringType.Name
and
Code: Select all
MethodBase.GetCurrentMethod().Name
get mangled. How can I stop obfuscation just on these items?
mattwilkinson
 
Posts: 1
Joined: Thu Nov 07, 2013 12:34 pm

Postby GieltjE » Thu Nov 07, 2013 2:35 pm

GieltjE
 
Posts: 13
Joined: Sat Aug 24, 2013 1:51 pm


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 1 guest