views:

469

answers:

4

Duplicate: http://stackoverflow.com/questions/800999/run-net-exe-in-linux

Hello,

Is it possible to make my existing Windows Forms Application made using Visual Studio 2008 and .Net framework 2.0 run on Linux by recompiling in Linux with less/No code changes?

Thanks

A: 

You may pick up some info here: http://stackoverflow.com/questions/800999/run-net-exe-in-linux

Fredrik Mörk
+1  A: 

very possible, however, depending on your application your mileage may vary. no-nos include third party libraries/DLLs that depend on COM and Win32 calls, and P/Invokes. you may also have to watch out for code that does file/directory concatenation, as unix uses "/" as directory separator while Windows uses "\".

cruizer
A: 

yeah you can, last I checked, their DataGridView is improving, it can hide columns now, however their VirtualMode on dgv isn't working yet.

I use Mono mostly for Remoting stuff, the DateTime type are now Remoting-compatible(yipee!) in Mono 2.4. before (in 1.9), I have to cast my datetime fields to string so it can be transported from and to Remoting middle-tier, this is not needed anymore in 2.4.

Use this guideline for writing portable software: http://mono-project.com/Guidelines:Application_Portability

an example:

To write portable software, you must make sure that you use the System.IO.Path.DirectorySeparatorChar (http:/monodoc/P:System.IO.Path.DirectorySeparatorChar) character when you must concatenate paths, or even better, use the System.IO.Path.Combine (http:/monodoc/M:System.IO.Path.Combine(string,string)) method to combine pathnames.

Michael Buen
A: 

I suggest you recompile the same code in the Mono IDE, and by making any minor alterations that may be required. I've done this many times.

baeltazor