9

I would like to develop Mono application for Win/Linux/Mac in C# on Windows. Is there any really good (Visual Studio comparable) IDE for that? The best would be if I could manage Visual C# Express to compile solutions using the Mono compiler.

I've found a #develop IDE, which looks very cool and has many features that Express edition of the Visual Studio hasn't (like plugins for TortoiseSVN, NUnit, etc). Hovewer the 3.* versions dropped support for Mono, so you are no longer able to compile solutions using the Mono compiler.

There is also a MonoDevelop. I've tried it and it sucks. Not comparable to Visual Studio at all. No WinForms designer, + tons of other missing features. I would just like if they would drop the development of MonoDevelop and build a plugin for #develop instead.

Is there any other good enough IDE, or is it possible to make the Visual C# Express or #develop compile the solutions with Mono compiler?

EDIT: Delphi Prism looks cool, but it isn't C#.

Paya
  • 5,124
  • 4
  • 45
  • 71
  • 4
    Wait -- you're developing a cross platform application and you're complaining about a lack of *Windows* form designer? Cross platform GUIs in Mono are usually done in GTK or something similar rather than winforms. – Billy ONeal Mar 28 '10 at 00:39
  • @BillyONeal: I've read it is possible to design .NET app using winforms, which runs on other platforms as well. It doesn't look very nice, but if I use custom controls, I could manage it. – Paya Mar 28 '10 at 00:47
  • Maybe. But it sure seems like you're reinventing the wheel there if you're fighting for the designer just for custom controls. Just my 2 cents. – Billy ONeal Mar 28 '10 at 01:06
  • Well if I want to create nice-looking application, I just need to see it when I design it. The GTK doesn't really look very nice in Windows. And in Mac neither. Even here (http://www.mono-project.com/Gui_Toolkits) they say it. ("Gtk+ apps run like foreign applications on MacOS X.") – Paya Mar 28 '10 at 01:21
  • 1
    #Develop is really Windows based. If you find MonoDevelop sucks, why not try to improve it? – Lex Li Mar 28 '10 at 04:10
  • 2
    @Lex Li-MSFT: I don't have time to improve MonoDevelop. And there is so much to improve, that I wouldn't be able to do anything else. :-) – Paya Mar 28 '10 at 09:12
  • 1
    point is #deveop does not work on linux, thats why mono develop exists and why it has a GTK# designer and not a winforms designer. – trampster Mar 29 '10 at 03:55
  • MonoDevelop has always had Linux as its primary platform, and so it always feels second rate on anything else. – supercheetah Mar 29 '10 at 06:51
  • Also, if you use WinForms, you're likely to run into cross-platform issues pretty quickly if you try to do anything complex. Its compatibility within Mono is rather shallow. – supercheetah Mar 29 '10 at 06:53
  • @supercheetah: I want to keep the UI as simple as possible, not just because I don't want to run into any compatibility problem, but because I want to make my software as user-friendly as possible. So I hope WinForms will be sufficient. Also Windows is my primary target platform, that's why I can't use anything else. And special UI for each platform is just too much work... – Paya Mar 29 '10 at 09:03

5 Answers5

9

You can always develop your applications using Visual Studio Express Edition (since you don't want to pay for the Mono Tools). Monodevelop will support compilation of Visual Studio solutions now, so just develop in VS, and recompile occasionally in Monodevelop to guarantee support.

Since Mono now supports Windows Forms, you can develop a Windows Forms application entirely in Visual Studio, and just deploy it using Mono. Since C# compiles to IL, it doesn't matter which IDE you use to develop - you can still run it on Mono.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
  • Well I don't fully understand the concepts behind Mono. I will be required to compile the solution using MonoDevelop and deploy the executable it generated, and not the .exe generated by VS, right? – Paya Mar 28 '10 at 01:08
  • 2
    @Paja: No. That's the beauty of Mono and CIL (which is what you generate with C#). You can run a program compiled with Visual Studio on Windows using Mono - without recompilation. Compiling with Mono just helps you make sure you're not doing something Mono doesn't support... If you stick to standard C# and Windows forms, it tends to "just work" on mono - with no recompilation. – Reed Copsey Mar 28 '10 at 01:18
  • @Reed Copsey: Well I'm using SQLite in my application, so if I want to use it, I would have to use the Mono SQLite, right? So I would have to compile it with MonoDevelop just always. But I guess I wouldn't have to if I wouldn't use SQLite. – Paya Mar 28 '10 at 01:26
  • You'll need to reference the appropriate version of SQLite - since it's using native code. Each platform gets its own version, I believe. If you use something that's all managed (completely written in C#) this doesn't happen. – Reed Copsey Mar 28 '10 at 01:34
  • Well according to this: http://www.mono-project.com/SQLite it looks like the SQLite ships with Mono, so I just need to reference to Mono.Data.SQLite and use it. But I can't to reference to that assembly in Visual Studio. :-( I would need to use MonoDevelop, where it is possible (tried it a while ago). – Paya Mar 28 '10 at 01:49
  • You should be able to reference it in Visual Studio, as well. It's a valid assembly. Just make sure you get any depedencies, and it should work. – Reed Copsey Mar 28 '10 at 01:52
  • Yeah I've finally managed to reference the assembly and it works! It is just not in GAC, but in the Mono folder in Program Files... I'm just not able to find SQLite binaries for Mac. Looks like it is included in OS X, but I'm not sure. – Paya Mar 28 '10 at 10:15
  • @Paja: Just compile against the one on WIndows, and run against the one on Mac. It's installed with Mono there. – Reed Copsey Mar 28 '10 at 17:14
  • @Reed Copsey: Well but I would like to deploy my app for Mac in a bundle using macpack. I hope that if I manually bundle with my app the version of SQLite that installed on my Mac the Mono installer, that it would work just fine elsewhere. By the way, is it a violation of Mono license to bundle the Mono with my application? I'm not an expert in this field, so I just don't know. – Paya Mar 28 '10 at 17:29
  • @Paja: I'm not a lawyer - so don't trust me completely - but Mono's licensing is pretty flexible. Should be no problem just redistributing. You'll probably need to recompile/build on Mac using Monodevelop - but you can do your main dev. on Windows using VS. – Reed Copsey Mar 28 '10 at 20:19
  • @Reed Copsey: Thanks. Maybe the Mac recompile won't be required, if I create my program in pure .NET 2.0 without any P/Invoke. – Paya Mar 29 '10 at 09:05
  • @Paja: It ~should~ just work without a recompile - but I would test it to verify. – Reed Copsey Mar 29 '10 at 14:43
8

How about Mono Tools for Visual Studio?

Note that it's a commercial plugin.

Miroslav Popovic
  • 12,100
  • 2
  • 35
  • 47
  • 1
    Yes I know it, but it won't run in Express edition. So I would have to buy Visual Studio for a few hundreds bucks. – Paya Mar 28 '10 at 00:45
3

Whilst SharpDevelop 3.2 does not support mono out of the box but if you download the source code for SharpDevelop you can find a code sample that contained the original code for mono support. If you build that sample then mono support will be re-enabled in SharpDevelop.

A decision was made to remove mono support from the main SharpDevelop application since only support for compiling with mono was provided and MonoDevelop can now run on Windows. Note that mono support in SharpDevelop does not provide any integrated debugging with mono's debugger and there is no GTK# designer compared with MonoDevelop.

Matt Ward
  • 47,057
  • 5
  • 93
  • 94
  • Yes, I've tried it already, I was able to compile the addon, hovewer while running the addon and building a Mono project, there were some errors. And I'm not going to fix an addon, which is no longer maintained. :-) – Paya Mar 28 '10 at 13:53
  • I wouldn't expect you to :) Whilst it may not be in the official release and not actively maintained if you report any bugs I will fix them. – Matt Ward Mar 28 '10 at 20:51
  • I don't want just one bug fixed, I want the plugin to be maintained. The #develop is best alternative for VS on Windows, but it could be even better, if it would have full support for Mono. I've never written any compiler/debugger, but is it really that hard to add this into #develop? As compiler you would use the Mono compiler, and the debugger can be copied from Mono Develop, if the license permits. – Paya Mar 29 '10 at 09:13
  • It is maintained but as a sample. The sample includes support for compiling your code with the mono compilers (C# and VB.NET). It does not support debugging your code with the mono debugger. I have not looked at MonoDevelop's debugger so I would not be able to say how much effort is required to implement this. It certainly has been on my TODO list for a long time but has dropped down the list due to other priorities like IronPython support. However I doubt this addin would make into SharpDevelop out of the box. – Matt Ward Mar 29 '10 at 18:00
1

You can use Mono Tools for Visual Studio. However, it's a paid product.

Franci Penov
  • 74,861
  • 18
  • 132
  • 169
1

I think your best bet will be to do development with VS C# Express, and then use a virtual machine--such as VMWare, Virtual PC, VirtualBox, etc.--to access Linux (which is the primary platform for MonoDevelop, and on which it works really well, comparably to VS.)

There are even a number of downloads available that are primed for doing exactly this. You could even use a Live CD, and just reboot your machine to get into Linux (which can usually access Windows partitions with no problems.)

supercheetah
  • 3,200
  • 4
  • 25
  • 38
  • That's exactly how I do it right now. :-) But it would be just nice to have an option to run the program in Mono on Windows directly from IDE (and for free), so I can see if it is 100% compatible on Windows. But I guess I will solve it this way: Develop SW in VS/#develop on Windows, then test it with MonoDevelop to see if it compiles with Mono compiler and if it runs OK in Mono on Windows, and then do the same for Mac and Linux. – Paya Mar 29 '10 at 11:05