Running GTK# Application on Windows

2019-09-06 02:48发布

问题:

I've just programmed and built a GTK# application using MonoDevelop on Linux Mint 16. I wanted to see if it's cross-platform enabled, so I tried to run it on a Windows 8 machine (which has .NET Framework 4.0), and installed Mono runtime (which includes GTK# for Windows) so that it could run over there.

Here's the issue: when I run the executable from Windows Explorer, I assume .NET Framework takes over, because nothing happens. The executable will run if, from within Windows, I enter "Mono command prompt", navigate to the .exe and type "mono filename.exe".

What can I do to enable the application to run from within the File explorer directly on Windows?

回答1:

You can't make an .exe file be launched from the File Explorer with Mono for Windows.

What you can do, though, is use the .NET framework to launch your .NET application. Gtk# libraries work in MS.NET, they don't have a dependency on Mono.