embedding dependencies within standalone executables

hello everyone~

i’ve just finished coding the first release of a tool i intend to use to help me finish another, bigger project not using monogame [or indeed c# !] and i want to create a standalone executable of it, but i’m running into some trouble.

i understand that users will need to install the .NET core runtimes and whatnot to run the tool, but things such as “MonoGame.Framework.dll”, “libSDL2-2.0.0.dylib”, the entire /content folder, and so on… surely these can all be compiled into one mostly selfcontained standalone executable [minus the .NET framework, of course]?

it’s understandable if the content folder has to stay outside, but surely the monogame framework should be embedded within the finished product where the end user can’t intefere with it =]

i have looked all over everywhere i could find for answers, but all i could find were people misunderstanding the nature of .NET… i realise this might be more of a c# issue than strictly monogame, but i wanted to ask here first - any advice you could send my way would be invaluble.


First google entry led me to https://github.com/Fody/Costura

Never used it, though.

then, there’s really no way to do it within the ide? I’ll just have to live with it?

that is… very disappointing.

Why do you like bad embedded method? Fody/Costura? Shit

It is better with MONO PROJECT because Mono can generate single executable without installed net frameworks 4.5 :wink:

Please remember mkbundle --static --deps -L “C:\Program Files (x86)\Mono\lib\mono\4.5” yourgame.exe -o yourgame_bundled.exe -v

Than you will try bundled executable another computer what does it happen? No problem :slight_smile:

hi jens! what you’re describing sounds very promising, but i’m having a little difficulty understanding - do you have any links to documentation of the feature you’re describing?

@Mouse, check Mono Project mkbundle. I hope you can read Mono Project documentation.