Options

Embedded dependencies and static classes

SlapYSlapY Posts: 2
edited August 17, 2014 11:59AM in SmartAssembly
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:
Engine.Initialize(this);

Works:
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
Sign In or Register to comment.