Cross-platform programming in Windows

Two questions:

  • Is there a way to write cross-platform programs in Microsoft Visual Studio?

  • If not, then can I write a C # application on VS2008 and recompile it with MonoDevelop and make it work?

+4
source share
8 answers

1 - I do not think so. Not without something like Mono.

2 - Yes, you can, but Mono does not cover all the frames - they work on it. Best checked with Mono Migration Analyzer. The Mosaic Analysis Tool (MoMA) helps identify problems that may occur in Mono - http://mono-project.com/MoMA .

I found that most of my .NET 2.0 applications can be converted, but you may need some changes.

+7
source

You can always use C ++ and QT. Soon QT will be released under the LGPL (starting with version 4.5), which will give even more freedom.

The only limit to using the free QT license is that you do not get integration with VS. However, this can be solved using, for example. CMake (which will generate VS solution files).

+4
source
  • Yes, write your code, compile and run on another platform using Mono. When you compile, you generate an IL that Mono can use. Note. Some features are not available in Mono. Delphi Prism, is an add-on for Visual Studio that allows you to encode Linux and Mac from VS, albeit in the Pascal language of the object.
  • Yes, see the same problems as in 1
+2
source

I agree with Joe90 , leaving only one thing: MonoDevelop can compile .sln and .csproj files because it has an MSBuild implementation .

So, indicate MoMA in your code, and if you get a green light, it should compile as it is in MonoDevelop.

As a junkie MSCLR, I have to admit that Mono has some β€œbest” implementations of some critical functions (mainly for encryption). Of these, you will get more use cases.

Another thing to pay attention to is subtle logic errors. If the class is implemented in Mono, this does not mean that it will behave the same with MSCLR (Mono is an implementation in a cold room and, as such, DO NOT use the source code). This is really where you get good results from the well-established codebase.

To give a good indication of what you expect, I remember seeing a lot of #if MONO in the AgsXMPP repository .

+2
source

Ideally, you can write a C # application and run it on the Mono platform. BUT, this will depend on the MS.NET libraries that were still ported to Mono.

Just in case, there are no language restrictions, you could use other languages ​​such as Java, Python, Ruby, etc.

Good luck

+1
source

Like so many others, your success will depend on the libraries you use. Mono has Winforms, but I would suggest that you also look at GTK # http://www.mono-project.com/GtkSharp as your window library. If you use GTK #, you will use a library that does not have a reverse construct (since Winforms is in Mono).

I understand that the non-gui .NET 2.0 stuff is pretty much in place with the latest versions of Mono

0
source

You do not need mono development, the whole idea is mono - you can develop for .net and have the same assemblies as for mono and .net, provided that you only use material that was implemented in mono.

Material that won't work: PInvoke, MOF, linq to SQL

Material that will work: .net 2.0, C # 3.0 (including linq for objects and linq for xml), WinForms

0
source

If you are writing your application in Silverlight, anyone with a web browser and Silverlight plugin can access your application. It is as cross-platform as you are going with .NET.

0
source

All Articles