Reputation: 13818
Duplicate: 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
Upvotes: 1
Views: 7943
Reputation: 11652
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.
Upvotes: 1
Reputation: 39393
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.
Upvotes: 0
Reputation: 6151
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 "\".
Upvotes: 5