Dot net 2.0 x86 build
brett_esler
Posts: 6
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?
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?
Comments
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 | Product Support Engineer | Redgate Software
Have you visited our Help Center?
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