views:

555

answers:

5

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#.

+7  A: 

How about Mono Tools for Visual Studio?

Note that it's a commercial plugin.

Miroslav Popovic
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.
Paja
+1  A: 

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

Franci Penov
+6  A: 

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
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?
Paja
@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
@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.
Paja
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
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).
Paja
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
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.
Paja
@Paja: Just compile against the one on WIndows, and run against the one on Mac. It's installed with Mono there.
Reed Copsey
@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.
Paja
@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
@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.
Paja
@Paja: It ~should~ just work without a recompile - but I would test it to verify.
Reed Copsey
+1  A: 

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
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. :-)
Paja
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
@Matt Ward: 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.
Paja
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
A: 

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
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.
Paja