views:

285

answers:

6

I realize this is a bit insane, C# being a Windows language and all, but I want to start learning C# mostly because I'm interested in ASP.NET MVC. I work as a web developer by day and my office is completely run on *nix machines. The developers and all other staff use Mac OS X and our servers are all some variation of Linux.

To be honest I just want to try something different than PHP, Python, or Ruby. The catch is that I don't want to give up my beloved Mac OS X. I've looked at Mono a bit and it seems like exactly what I am looking for. Unfortunately MonoDevelop is very slow to the point of uselessness on Mac OS X. (Unless I'm doing something wrong which is entirely plausible).

So my question boils down to this: What is the best way to code and compile C# apps on Mac OS X. (Running the code is not that big of issue, I'll probably just get some cheap server space to run my ASP.NET MVC apps on. I'm not really looking to run any apps on Mac OS X.)

+5  A: 

what about running a virtual Windows machine on your Mac?

see http://www.parallels.com/eu/products/desktop/

jao
I've thought about it and it is a viable option, but I personally much prefer Mac OS X and was hoping a native solution existed. I do already use VMWare Fusion to run Windows XP. I was hoping for a Mac OS X native solution.
macinjosh
While you can learn C# using mono natively, ASP.NET is really best developed using Visual Studio. You're really going to be fighting the system trying to shoehorn it into something else (much like trying to build iPhone apps on Windows; you can do it, but what a pain).
Rob Napier
+10  A: 

In my own experience as a C#/Windows/ASP.Net developer the greatest strength of the platform is the integration with the tools. That said it is difficult to get it all running on mono. Mono would be an excellent deployment platform. But if you want to learn asp.net MVC your best bet is to set up a virtual Windows environment and get the free visual web developer visual studio: http://www.microsoft.com/express/vwd/ .

The other reason is that if you're trying to learn the platform, most resources will use some variant of Visual Studio. I find it rather difficult to try and learn a framework and have to struggle with platform differences at the same time.

I say this as an avid OS X user that has done C# development for several years and has done several small projects in asp.net mvc.

Min
I run a Windows 7 VM on my Hackintosh for .NET development and find this to be the best approach.
Jon Freeland
@Jon: If it's a hackintosh, why don't you just dual boot?
BFree
When I was a C# dev, Windows was my native OS and I still developed in a VM because of the benefits of configuration snapshots and rollbacks.
Matt Garrison
+2  A: 

+1 to Min's answer.

The tools Microsoft provides (free and purchased) are amazing and integrate very well. The more I use Visual Studio, the more I love it.

I highly suggest doing your dev for ASP.NET/C# on Windows (bootcamp or vmware or w/e).

Having to switch between OSes when you want to code is a small price to pay compared to the potential compatibility headaches you might face in the future.

Baddie
A: 

Developing in .net is quite highly IDE-oriented. Of course you can do it all in a plain old text editor but it gets harder and harder unless you're writing back-end server code only. Maybe there are great mono-based IDEs but I can't see why you'd prefer to use MacOS when all the time will be spent using the IDE anyway.

Definitely vote for virtualized Windows or using BaseCamp.

John
-1 to "Developing in .net is quite highly IDE-oriented"
Vadi
John
+1  A: 

I'd add to the virtualisation argument. If you were to go for a Windows installation in VMWare Fusion, for example, you can run it in coherence mode. In this mode, you still get all the apps and system you know and love in OS X, and make Visual Studio appear as if tit were a native OS X app. VS, though, "sees" the Windows environment, so you get the benfits of developing on Windows.

Of course, you have the overhead of having two OSs competing for resources, but most of the time this is not an issue (It isn't to me, anyway, and I run my own projects at home this way on a humble MacBook)

ZombieSheep
+1 to virtualization, but I can use the Win/*nix/OSX desktops equally well and the mix and match of system behaviors on a single desktop is messy. Coherence mode is anything but coherent for me (and it's still plenty glitchy).
Matt Garrison
A: 

I concur with a virtual windows machine and VS Express, but Mono Develop is not that bad when especially targeting ASP.NET MVC.

kenny