Embedded dependencies and static classes

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Embedded dependencies and static classes

Postby SlapY » Sun Aug 17, 2014 4:59 pm

Hi RedGate.
First off, thanks for SmartAssembly! It's gorgeous (like all your .NET products)

On thing though:

I'm working with static classes in my rendering engine a lot.
A basic application starts with Engine.Initialize().

Now I encountered a problem using {SA}:
I have embedded (not merged*) several libraries of the SharpDX project.
Now it seems that the dependencies are not unpacked/decrypted when using static classes/methods. I tried to initialize a really simple class of the project before using the static class/method and it works so I guess the dependencies are only getting unpacked when using a constructor.

Doesnt work:
Code: Select all
Engine.Initialize(this);


Works:
Code: Select all
new Object();
Engine.Initialize(this);


Is there any way around that issue (except from creating any instance from that library) or could this get fixed in any way? Is there any manual call I could make in Initialize() to force the unpacking or something simillar?

* I already kind of gave up on merging, it always throws a signature error (System.InvalidOperationException: Signature is not a field signature) any ideas on that? Also, this is not as important to me as the embedding, which is my preferred way to go.

Thanks,
Benjamin
CEO, Tiny Unique Innovations
SlapY
 
Posts: 1
Joined: Sun Aug 17, 2014 4:40 pm

Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests