Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile all files to one exe?

Tags:

c#

ilmerge

I wrote a project in C# that uses a lot of images, Milk models and openGL and i want to pack everything in one exe so i can upload it to my site. Right now i got an exe that is depended on other files like jpgs etc'. I've tried using ILMerge but couldn't get it to work. Is there a simpler solution? thanks.

like image 577
Segev Avatar asked Aug 08 '12 10:08

Segev


3 Answers

I shall prefer to create a satellite assembly for resource files. http://msdn.microsoft.com/en-us/library/21a15yht%28v=vs.71%29.aspx

like image 97
Tinku Avatar answered Sep 28 '22 01:09

Tinku


When you add an image to the project in properties you can set it as Embedded Resource, then it'll be added to the binary file (dll or exe)

like image 38
Fedor Hajdu Avatar answered Sep 28 '22 01:09

Fedor Hajdu


You can put all your files/images into the exe as Embedded Resources.

See How to embed and access resources by using Visual C# (This link currently 404s)

like image 42
logicnp Avatar answered Sep 28 '22 01:09

logicnp