Click here to Skip to main content
15,844,602 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
How to implement Dot net C#/VB windows application for Linux OS- Ubuntu.

Please suggest and help with some sample code.

Thanks
Posted

 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 5-Jun-13 13:15pm    
Correct, a 5.
I also added a number of important points critical when one needs to get started. Please see my answer.
—SA
Oshtri Deka 5-Jun-13 15:45pm    
Valid answer. 5.
Some important point in addition to the correct answer by Mike Meinz, Solution 1:

You can develop applications on Windows and run it on other platforms, and visa versa, without recompilation.

You need to develop applications more accurately, keeping to standards and avoiding P/Invoke of platform-specific methods. That is, all or most of the code should be limited to BCL (which is standardized). Some non-standard libraries are also implemented in Mono, notably ADO.NET and System.Windows.Forms.

For a formal compatibility check, you can use The Mono Migration Analyzer (MoMA): http://www.mono-project.com/MoMA[^].

On Windows, you can develop and test your code on Windows directly, and than on Mono for Windows. This second step already gives you a good assurance.

If you want to develop on Linux, you can use MonoDevelop IDE:
http://en.wikipedia.org/wiki/MonoDevelop[^],
http://monodevelop.com/[^].

It is also available on Windows though. Besides, you can use different but related IDE for Windows, #develop:
http://en.wikipedia.org/wiki/Sharpdevelop[^],
http://www.icsharpcode.net/OpenSource/SD/Default.aspx[^].

—SA
 
Share this answer
 
Comments
Ron Beyer 5-Jun-13 13:20pm    
Careful though, I tried doing this in a class library that did not use databases and found one very annoying non-supported language feature, default values. Using default values in function calls is not supported on Mono and will give a compilation or runtime error.
Sergey Alexandrovich Kryukov 5-Jun-13 13:27pm    
I agree. I faced such problems; and my answer is based on considerable personal experience in such development.

Some .NET database interfaces are not well shaped for Mono, simply because they can be wrappers over native client software with its suitability and availability on some platform is well... questionable. In one case, I had to make an abstraction layer to use different types of adapters to the same database.

There are other problems, in UI, in particular.

That said, CLR compatibility comes at some cost. But the cost should be considered in connection with the benefits of multiplatform solution. Besides, I'm sure that is some code is developed in platform-compatible way, it requires accuracy, and it make the product much more supportable even on a single platform. If the platform compatibility was upholded properly on the road, of course.

—SA
Abhinav S 5-Jun-13 13:46pm    
5.
Sergey Alexandrovich Kryukov 5-Jun-13 14:53pm    
Thank you, Abhinav.
—SA
Oshtri Deka 5-Jun-13 15:46pm    
I gave 5 to answer 1, therefore I must give it here as well.
5.
Answer will help me ,

Can i implement/build Mono on Window OS and run exe on Linus OS?

Can i implement/build normal on Window OS and run exe on Linus OS?
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-Jun-13 13:05pm    
Not an answer, does not belong here. Please use "Improve question"
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900