Red Gate forums :: View topic - Issues when using reflection and Obfuscation
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Issues when using reflection and Obfuscation

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
mattwilkinson



Joined: 07 Nov 2013
Posts: 1

PostPosted: Thu Nov 07, 2013 12:41 pm    Post subject: Issues when using reflection and Obfuscation Reply with quote

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

Code:
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:
MethodBase.GetCurrentMethod.DeclaringType.Name
and
Code:
MethodBase.GetCurrentMethod().Name
get mangled. How can I stop obfuscation just on these items?
Back to top
View user's profile Send private message
GieltjE



Joined: 24 Aug 2013
Posts: 13

PostPosted: Thu Nov 07, 2013 2:35 pm    Post subject: Reply with quote

Please read: http://www.red-gate.com/supportcenter/content/SmartAssembly/help/6.7/SA_UsingCustomAttributes
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group