Dot net 2.0 x86 build

.NET obfuscator and automated error reporting

Dot net 2.0 x86 build

Postby brett_esler » Wed Feb 26, 2014 1:27 pm

I have a class library + dependencies build for x86 and dot net 2.0

SmartAssembly builds
- includes Dependencies Merging + Embedding
- Obfuscation
- Strings Encoding

All seems fine until I try to load from an x86 built exe - when I obtain error
"The type initializer for '<Module>' threw an exception."
Inner: "Common Language Runtime detected an invalid program."

I have requirement to force running as x86.

I have also tried building all libs for Any CPU.- it runs under x64 okay (loads+runs) - except for the parts that I need to be 32bit.

Any ideas?
Posts: 4
Joined: Wed Feb 26, 2014 1:03 pm
Location: Australia

Postby brett_esler » Thu Feb 27, 2014 2:57 am

Follow-up: I have worked around this by going back to version 3.2 of SmartAssembly which works just fine for x86 32bit builds of my libraries and calling exe - is this something that can be supported in the current version?
Posts: 4
Joined: Wed Feb 26, 2014 1:03 pm
Location: Australia

Postby jessica.ramos » Thu Feb 27, 2014 6:05 pm

Hi Brett,

Sorry to hear you're running into an issue with SA!

I'm very glad you've found a workaround by downgrading, but I don't immediately know why this shouldn't work with the latest version 6.8--hopefully we can find an alternative workaround to downgrading. To help us better understand first what was going wrong, can I please check:

(with 6.8..)

-If you turn off all options and just process your assembly through SmartAssembly, does the error still occur then?

-Should the simple SA-processed version still work, could you kindly try turning on merging/embedding, obfuscation, and strings encoding features one-by-one to see which particular one is causing the error?

-Would you be able to share your application with us or a cut-down version? That would be the best way for us to troubleshoot this, but I understand if this isn't possible!
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Posts: 544
Joined: Mon Apr 23, 2012 12:13 pm

Postby brett_esler » Thu Feb 27, 2014 10:17 pm

Great advice - thanks for the help.

The issue only arises when the Other Optimizations "I want to reduce unused allocated memory" option is checked (does that even make sense for class libraries?) - everything else merging, embedding, strings encoding etc work fine now.

I have just been evaluating SmartAssembly and will be purchasing now (tell your boss ;)) - product is great, fora and support awesome :D

:D :D :D
Posts: 4
Joined: Wed Feb 26, 2014 1:03 pm
Location: Australia

Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests