Red Gate forums :: View topic - Property Grid Bug
Return to www.red-gate.com RSS Feed Available

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

Property Grid Bug

Search in SmartAssembly 5 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
sukhani



Joined: 03 Oct 2010
Posts: 4
Location: India

PostPosted: Sun Oct 03, 2010 3:11 pm    Post subject: Property Grid Bug Reply with quote

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.



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

What should I do?

Thanks,

Cheers,
Saurabh

[/img]
Back to top
View user's profile Send private message
Alex.Davies



Joined: 02 Dec 2008
Posts: 335
Location: Cambridge, uk

PostPosted: Mon Oct 04, 2010 10:35 am    Post subject: Reply with quote

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/Content.aspx?p=SmartAssembly&c=SmartAssembly/help/5.5/SA_UsingCustomAttributes.htm&toc=SmartAssembly/help/5.5/toc.htm
_________________
Alex
Developer,
Red Gate .NET Tools
Back to top
View user's profile Send private message
sukhani



Joined: 03 Oct 2010
Posts: 4
Location: India

PostPosted: Mon Oct 04, 2010 12:17 pm    Post subject: Thanks Reply with quote

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

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/Content.aspx?p=SmartAssembly&c=SmartAssembly/help/5.5/SA_UsingCustomAttributes.htm&toc=SmartAssembly/help/5.5/toc.htm

Why is it preferable to use attributes rather than going into obfuscation settings in SmartAssembly ?
Back to top
View user's profile Send private message
Alex.Davies



Joined: 02 Dec 2008
Posts: 335
Location: Cambridge, uk

PostPosted: Mon Oct 04, 2010 12:18 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
sukhani



Joined: 03 Oct 2010
Posts: 4
Location: India

PostPosted: Mon Oct 04, 2010 12:56 pm    Post subject: thanks Reply with quote

Thanks for helping me out Alex. I appreciate your help.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. 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