0
votes

I'm going to develop and compile C#/Mono app on Windows 7 with Visual Studio and then run this app at Linux device. I googled a lot, but one point is still confusing me - how should I set up my development environment. I have Mono for Windows installed on my laptop and now there are two possibilities:

  1. create regular windows c#/net project which will use references from Windows\MS.NET framework, build this project using msbuild, copy and run this app on Linux
  2. create Mono target for VS, create project which will use references from ProgFiles(x86)\Mono\lib, build this project using xbuild etc.

Which way I should choose? It seems to me, that option #2 is more preferable, but I do not understand why.

2

2 Answers

0
votes

None of your solutions is very good. I would choose a 3rd one:

  1. Develop your code with Linux, using MonoDevelop IDE.

There are many reasons why this option is the best, such as:

  1. Mono for Windows is suboptimal: You will find some things don't work (which do work on Linux) or things that are much slower than normal.
  2. Mono is not 100% compatible with MS.NET: Some things are unsupported in Mono (e.g. System.Management) or have too many bugs to be considered stable (e.g. WCF). So it's better that you test on Mono as soon as possible, i.e. while developing and debugging locally.
  3. MonoDevelop is still a very good IDE which can compete with VS in some areas (e.g. Code Completion).
0
votes

Well, I use myself mono on Linux/ARM and I do all my development under Visual Studio, just compiling for AnyCPU and taking a bit of care on what to use.

You can even debug your program on the target machine from Visual Studio using MonoDebugger, it starts to work decently.