Good IDE for Mono on Windows
Asked Answered
M

5

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

Mitra answered 28/3, 2010 at 0:26 Comment(10)
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.Grandchild
@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.Mitra
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.Grandchild
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 (mono-project.com/Gui_Toolkits) they say it. ("Gtk+ apps run like foreign applications on MacOS X.")Mitra
#Develop is really Windows based. If you find MonoDevelop sucks, why not try to improve it?Sedge
@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. :-)Mitra
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.Mouthwash
MonoDevelop has always had Linux as its primary platform, and so it always feels second rate on anything else.Pointed
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.Pointed
@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...Mitra
C
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.

Cooler answered 28/3, 2010 at 1:4 Comment(12)
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?Mitra
@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.Cooler
@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.Mitra
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.Cooler
Well according to this: 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).Mitra
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.Cooler
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.Mitra
@Paja: Just compile against the one on WIndows, and run against the one on Mac. It's installed with Mono there.Cooler
@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.Mitra
@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.Cooler
@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.Mitra
@Paja: It ~should~ just work without a recompile - but I would test it to verify.Cooler
D
8

How about Mono Tools for Visual Studio?

Note that it's a commercial plugin.

Dipietro answered 28/3, 2010 at 0:35 Comment(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.Mitra
P
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.

Philhellene answered 28/3, 2010 at 13:26 Comment(4)
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. :-)Mitra
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.Philhellene
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.Mitra
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.Philhellene
E
1

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

Enthymeme answered 28/3, 2010 at 0:35 Comment(0)
P
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.)

Pointed answered 29/3, 2010 at 7:1 Comment(1)
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.Mitra

© 2022 - 2024 — McMap. All rights reserved.