Property Grid Bug

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, Alex.Davies, melvyn.harbour

Property Grid Bug

Postby sukhani » Sun Oct 03, 2010 3:11 pm

Hi Guys,

I am using SmartAssembly 5.5 to obfuscate my program which is made in VB.NET and uses .net 3.5. It's a windows forms program.

Now what has happened is after just selecting obfuscation option in smartassembly when I run my exe and open a form which has a property grid, some of items appear as junk. The image below will show you what I mean.

Image

Can anyone help me out ? To me it seems that there is a bug in SmartAssembly.

What should I do?

Thanks,

Cheers,
Saurabh

[/img]
sukhani
 
Posts: 4
Joined: Sun Oct 03, 2010 2:57 pm
Location: India

Postby Alex.Davies » Mon Oct 04, 2010 10:35 am

Looks like the property grid reads the names of something that has been obfuscated (enum members it looks like) by reflection.

Obfuscators can't guarantee to preserve behaviour when reflection is used, of course.

You can either exclude it from obfuscation using the SmartAssembly project settings, or I prefer using attributes:
http://www.red-gate.com/supportcenter/C ... .5/toc.htm
Alex
Developer,
Red Gate .NET Tools
Alex.Davies
 
Posts: 335
Joined: Tue Dec 02, 2008 12:23 pm
Location: Cambridge, uk

Thanks

Postby sukhani » Mon Oct 04, 2010 12:17 pm

Thanks a lot guys for your help. Thru smartassembly's project settings, I selected that class not to be obfuscated. It then worked. :)

Alex, you said -
You can either exclude it from obfuscation using the SmartAssembly project settings, or I prefer using attributes:
http://www.red-gate.com/supportcenter/C ... .5/toc.htm

Why is it preferable to use attributes rather than going into obfuscation settings in SmartAssembly ?
sukhani
 
Posts: 4
Joined: Sun Oct 03, 2010 2:57 pm
Location: India

Postby Alex.Davies » Mon Oct 04, 2010 12:18 pm

I like to keep the information that they must be excluded from obfuscation in the code, where you can see it if you add, for example, another element to the enum, or another similar enum. You won't forget to exclude it from obfuscation then.
Alex
Developer,
Red Gate .NET Tools
Alex.Davies
 
Posts: 335
Joined: Tue Dec 02, 2008 12:23 pm
Location: Cambridge, uk

thanks

Postby sukhani » Mon Oct 04, 2010 12:56 pm

Thanks for helping me out Alex. I appreciate your help.
sukhani
 
Posts: 4
Joined: Sun Oct 03, 2010 2:57 pm
Location: India


Return to SmartAssembly 5

Who is online

Users browsing this forum: No registered users and 0 guests