[Mono-list] Running Mono/.NET applications without installation of Mono

D.R.W. denny_r._walter at web.de
Fri Dec 5 16:54:20 EST 2008

I know that C#/.NET/Mono/etc. is not for creating native machine code
programs like C++. But I'd like to know: Is there a way to create a
C#/.NET/Mono application that can be used without installation of the Mono
framework? But before you answer, let me explain what I mean. (By the way, I
don't know if that's important, but I'm referring especially to the Windows
version of Mono in this thread here.)
I'm thinking of two possibilities:

1. Statically linking all the required files into the exe.
Is this possible with Mono? Is it possible to create an application that has
all the required dependencies linked together, so that the user on the
client system just needs to double click the file and it runs, without an
installation of Mono or the .NET Framework? If yes, how large will this
executable be?

2. Putting the required files in the folder of the exe.
In this case, we wouldn't statically link the required files into the
executable, but we would put them next to the execuable. The advantages that
I'm imagining are:
- The user would just need the required files, not the whole Mono framework.
- No installation of Mono via a setup would be necessary. The required files
would simply lie in the same folder relative to the executable program which
means that an application and its dependencies could be distributed in a
simple zip file and the user opens it, clicks the program file (or a batch
file) and it runs. When the user doesn't want the program anymore, he could
just throw away the folder (or the zip file) without having to uninstall
anything via the Windows uninstall function. (This method is comparable with
a C++ MFC application where I simply put the MFC42.DLL and the MSVCRT.DLL
into the same file as the exe itself and thus, everything runs fine without
any setup installation at all.)

Alright, these are the two ways that I imagine to run a .NET application
with Mono, but without having to install Mono (or the .NET Framework):
Static linking. Or putting the necessary files into a folder relative to the
application (instead of the "Program files" folder), so that it will run
immediately without an installation.

Are these ways possible somehow? Or wouldn't that work? I'm very new to
Mono, so I don't know and I really appreciate your help. Thanks.
View this message in context: http://www.nabble.com/Running-Mono-.NET-applications-without-installation-of-Mono-tp20863199p20863199.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list