Red Gate forums :: View topic - Dot net 2.0 x86 build
Return to www.red-gate.com RSS Feed Available

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

Dot net 2.0 x86 build

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
brett_esler



Joined: 26 Feb 2014
Posts: 3
Location: Australia

PostPosted: Wed Feb 26, 2014 2:27 pm    Post subject: Dot net 2.0 x86 build Reply with quote

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



Joined: 26 Feb 2014
Posts: 3
Location: Australia

PostPosted: Thu Feb 27, 2014 3:57 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
jessica.ramos



Joined: 23 Apr 2012
Posts: 213

PostPosted: Thu Feb 27, 2014 7:05 pm    Post subject: Reply with quote

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



Joined: 26 Feb 2014
Posts: 3
Location: Australia

PostPosted: Thu Feb 27, 2014 11:17 pm    Post subject: Reply with quote

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 Wink) - product is great, fora and support awesome Very Happy











Very Happy Very Happy Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic 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