Bundling the Windows Mono runtime with an application

Regarding my earlier question about the Point of Mono on Windows, let's say that I develop an app against the windows mono runtime so that it will also run on Linux, OSX, etc.. and to make it more complicated, I use GTK# so that I don't have to deal with WinForms. Is there then an easy way to bundle the Windows Mono runtimes with my Windows version of the application so that it can all be installed at once? Or, is there no point to this? Once I develop against the Windows Mono runtime, would it still run fine against the MS .NET runtime? (I assume I would still need GTK# installed though).


The short answer is Yes.

The things you should take care about while programming are

  • Not to use platform API
  • Don't hardcode directory & file name separators, ie don't hardcode file paths, but use appropraite class to obtain path separator then concat the names.
  • Keep in mind that file names on *nx are case sensitve and on Windows are not. While programming don't refer to the same file as log.txt and Log.txt but keep it all small.
  • Other then that, if you created GTK# application on *nx system, you will be able to run it on Windows if you installed GTK# assembly, and vice-versa.

    I did this myself, and it worked like expected. I had a problem to find specific assembly dll version of GTK# on Windows and that took me few hours.


    In general, you probably would just use the .Net runtime on Windows. The installer for GTK# for .Net is available from Mono's download page. Your users would need this installed, and then could run you app using the regular .Net runtime.

    链接地址: http://www.djcxy.com/p/90110.html

    上一篇: service2在Linux上的Dotnet4服务

    下一篇: 用应用程序绑定Windows Mono运行时