Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bundle .net exe, dlls, .net environment and Native dll in single exe

Tags:

c#

windows

gcc

I am trying to bundle my C# application(.exe) with its dependent dlls, a Native dll and required .net assemblies to single exe using mkbundle.

So, first of all is it possible to do so using mono mkbundle?

If yes, when I try to do it using command

C:\MyProjDir>mkbundle -o BundleName --deps OriginalAppName.exe

When compiling

as -o temp.o temp.s 

I get error:

'as' is not recognized as an internal or external command, operable program or batch file. [Fail]

I found somewhere that I need to install gcc, gcc-mingw and as packages. (sic). I did install gcc, gcc-mingw but I don't know where to find as packages which is the error. Please suggest if there is any other way of doing it. Thanks

like image 468
user2612439 Avatar asked Oct 02 '14 17:10

user2612439


1 Answers

You can use ILMerge

For the Native DLL you can embed the DLL as an application resource, and extract the resource to disk at the time of execution.

like image 135
Michael G Avatar answered Oct 12 '22 23:10

Michael G