Search code examples
c#monomonodevelopgtk#

How to run Mono application on Windows properly?


I am completely new to Mono and Gtk#. I'm developing an app on Linux but I want to run it on Windows as well. However, if I build the app using MonoDevelop and then run the .exe file in Windows, it doesn't launch.

Is it really possible to make Windows apps using Linux/Mono, or am I missing something?


Solution

  • Like Symon said, you have to build your project on the operating system you're intending it to be be compiled for because of the resources (API's etc.) that specific operating system is loaded with.

    When I have a problem like this, I simply use a virtual machine software like VirtualBox or VMware to run Windows and then install and run MonoDevelop inside of Windows. Don't worry about the expensive cost of Windows, for you can just get Windows from Microsoft's website here. There will be a little watermark in the corner of the screen because you didn't pay for the copy, but everything is still totally legal and fit for software development.

    UPDATE: A better method to do this is to install the GTK# dependencies and then recompile the program.