What are the challenges you face when working across database platforms? Take the survey
Options

Vista & Win7 x64 polymorphism issue in .Net 4.0

Alex123456Alex123456 Posts: 6
edited October 22, 2014 3:07PM in SmartAssembly
Hello,

I'm having an issue with Vista & Win7 x64 bit running on .Net 4.0 (tested in .Net 4.5.2 and was not an issue).

Basically in a method I have a local variable declared as an interface type, and then I cast it (using the "as" operator) to a concrete type (that implements that interface). What I get back is null even thought that class implements the original interface of the variable. All interfaces and classes are public. Here are the options I obfuscate with:
/tamperprotection=true
/reducemem=false// Breaks 32bit windows
/sealclasses=true
/preventildasm=true
/methodparentobfuscation=true
/fieldobfuscation=3
/typemethodobfuscation=3
/stringsencoding=true;improved:true,compressencrypt:true,cache:true 
/assembly=name.dll;prune:true,nameobfuscate:true,compressencryptresources:false 

Any ideas what's wrong? The obvious solution is to include .Net 4.5 (where it's not an issue) instead of .Net 4.0, but many of our customers are on .net 4.0 and we don't want to force them to upgrade unless it's absolutely necessary.

Thanks

Comments

  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Alex,

    Thanks for your post!

    Would it be possible for you to share your application or a cut-down version so that we can reproduce and analyze this in-house?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.