Purpose: Run Win32 .Net2.0 Forms application written with VS2005 on Linux. I have tried the following:

  1. I have Installed Mono following this link run-net-2-0-applications-for-win

and tried to run it -> i ended up with an Warnings such as:

WARNING: The runtime version supported by this application is unavailable.

Using default runtime: v4.0.30319

and Unhandled Exceptions: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' or one of its dependencies. File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' or one of its dependencies. File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes' 2. Then I created "Hello world" simple windows forms app with an app.config file in VS2015, that says:

<configuration>
<startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>

Complied it, and ran it using MonoDevelop on ubuntu. i succeeded but with the same warning as above despite the <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />

And than I said to my self, lets Try to Debug the process and see what the app is missing.

than I tried 3 different debuggers (winedbg, IDA and mono --debug) and settled down trying to work with the latter because the documentation was easy and simple to comprehend. Following the documentation instructions i found out that Mono Develop debugger tools can be used only when the program is developed in "MonoDevelop" and compiled on "Debug" mode OR developed in Windows and successfully complied in MonoDevelop.

When I tried to complie the application I got mis-match to all the references of the application and I spend some time installing :

sudo apt-get install libmono-system-windows-forms4.0-cil

to get System *.dll's .. When I finished, and tried to compile again I got hundreds of errors saying mono is not recognizing Microsoft common target file types like Object, Integer, Double etc..

Now I'm lost, and I need you help. How do I run Windows forms application gui on linux?? or Debug the process successfully?

Much appreciated,

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.