View previous topic :: View next topic |
Author |
Message |
hi_jack
Joined: 10 Mar 2016 Posts: 19
|
Posted: Thu Apr 13, 2017 10:56 am Post subject: Embedding dll |
|
|
Hello,
To simplify the deployment of my application I wish to embed my dll both managed and native.
My application is a WPF executable.
Is it possible with .NET Encryptor?
What would be the scenario embed before encryption or after?
Is there any recommended scenario or tool?
Thank you in advance |
|
Back to top |
|
 |
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Apr 17, 2017 12:16 am Post subject: |
|
|
Native (unmanaged) DLLs can not be embedded as resources and loaded dynamically (like managed DLLs can). You could potentially embed them as resources in the bootstrap executable and then have the bootstrap save them to disk before running the main encrypted exe. It could also delete them afterward. _________________ Infralution Support |
|
Back to top |
|
 |
hi_jack
Joined: 10 Mar 2016 Posts: 19
|
Posted: Fri Apr 21, 2017 1:40 pm Post subject: |
|
|
Hello,
Thank you for explaining that.
Could you also explain how to embed managed dlls.
The documentation states :
If your application references other assemblies these can also be encrypted using .NET Encryptor by adding a pre-build command line for each assembly. This allows you merge multiple assemblies into a single compressed executable.
I understand the first part.
Could you explain how to merge multiple assemblies int a single compressed executable?
Should I use Ilmerge or another tool?
Thank you,
Jack |
|
Back to top |
|
 |
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sat Apr 22, 2017 1:01 am Post subject: |
|
|
You add the encrypted assemblies as embedded resources to your bootstrap project (in the same way as for the main assembly). .NET Encryptor not only encrypts the assemblies it also compresses them. So the result when you compile your bootstrap executable is that you have a single executable containing the encrypted compressed assemblies. _________________ Infralution Support |
|
Back to top |
|
 |
|