I have a .net 3.5 application and i’d like to make it portable.
It’s simple and runs perfectly, i’ve sent the .EXE + .DLL’s to some friends and it works as intended when running the exe with the .DLL’s and the .ICO (that i have used in it) along in the same folder.
What i want is simple: creating a single EXE file that cares the dll’s, image and whatever-i-want along with it without being a setup, and requiring no installation. (a.k.a portable)
I may consider migrating it to .net 2.0 if needed, i don’t use any 3.5-only functionality, in fact, i’m not really sure why i’m using 3.5 (i’m new at programming anyhow)
I’d like any tips, links, or an explanation on how to do it, because it’s really annoying sending .rar’s to my friends and telling them to extract and run the .exe among all “weird files” as they call (besides, not everyone has extension display in folders, so it’s a nightmare)
(I have searched in StackOverflow, and haven’t found any questions that answer what i’m asking, the only one that I found to be like it ended up in a discussion of framework availability in windows machines, language choosing and no good answers.)
You can use ILMerge to merge all the assemblies into your executable. I’d expect your icon to already be an embedded resource – or you should at least be able to create it as such.
Targeting .NET 2.0 would make the application more widely portable in that it would just work on machines which only have .NET 2.0 installed – but I don’t know what the proportions look like for 2.0 vs 3.5 deployment, and more importantly they may well not be the same as the proportions for deployment out of your target audience.