views:

2190

answers:

11

I have just got a MacBook Pro and have been using it (+Fusion) to develop on for about a month now. The purpose of this question is similar to Hidden Features of C#; to become a how-to of tips and trick for windows development on a mac.

I should clarify that I am aware of boot camp but do not use it (nor do I have any interest to), hence my use of steady state to make sure nothing happens to my OS partition without my knowledge. However; as Sara pointed out, Apple makes great hardware and I absolutely LOVE the form factor of my MBP so for someone who is looking for a windows only laptop a mac with boot camp should not be overlooked as the hardware is amazing.

My environment is as follows
* MacBook Pro 15" 2.4Ghz 2GB RAM (Going to upgrade to 4GB soon)
* VMWare Fusion 2.0 Beta
* Windows XP Pro SP3 (Slipstreamed BEFORE install)

Tips:
* Use Windows Steady State to keep OS consistent
* Use svn+ssh to connect to the mac for small repositories then use time machine to backup.
* Use spaces.

A: 

I believe project mono has mac support.

This assumes you want to develop directly on the mac and that you are happy to forgo some of the MS specific features and tools (so no C#3.0, libraries like WPF and Visual Studio).

Of course, using paralles/vmware/virtualbox or any other virtual machine with a windows guest as you describe will also work fine.

Oded
A: 

I use a Mac Book Pro as well but I run Vista. I set aside a little space so I could also run Leopard and just use Boot Camp. You can use Boot Camp to just boot from windows so you never have to deal with Leopard unless you want to.

I would highly reccomend it because Apple makes great hardware while Microsoft makes great tools (and also great OSs, I love Vista)

go ahead and downmod me for being a fangirl, but I've found what works for me.

Sara Chipps
+1  A: 
  • The extra RAM is great for your OS X environment, but my experience has shown you shouldn't exceed VMWare's recommended RAM settings of 1G.
  • I was unsuccessful at getting a good experience running my VM(s) from an external drive. And it's a firewire 800. Keep your dev image pruned to as little space as possible and run directly from your internal drive.
  • If you're sticking with XP (good choice BTW), you might want to give VirtualBox a try. It's VERY zippy. However, it chokes on Vista.
  • If you have a thought about trying Parallels ... DON'T!!! It worked well enough for a while but eventually became very unstable, crashing often when host files were accessed and freezing 2 out of 3 times during startup. Also, their implementation of networking is convoluted and difficult to setup if, say, you wanted to browse an Apache site on your host from your guest.
  • If you need to resize your image, there's a good tutorial for Parallels using GParted and Partition Magic. I'm sure it would be simple to adapt it to VMWare.
  • Your use of SVN is almost exactly what I do (repo is on host, backed up with Time Machine). However, you could speed it up and remove the bloat of a server if you go with simply a file-based repository.
xanadont
+5  A: 

One more thing, there is a Deep Fried Bytes Podcast that is entirely about .NET development on Mac - you may find some nuggets in there too.

David in Dakota
+1  A: 

I develop in ASP.Net on my mac almost daily, and I have to question why you aren't interested in Boot Camp. Yeah, VMWare is nice, but for my money nothing beats the performance of running Windows by itself on the Mac.

Josh Hinman
A: 

Oded, it depends on what type of .NET development one is trying to do, and for what platform. If you're targeting Windows and building something other than console apps, you're best off not using Mono, as Mono projects are not necessarily drop-in-to-Windows-and-go solutions.

Brian Warshaw
A: 

@Josh
I am not interested in Boot Camp for several reasons:
* I had virtualized some of my development before getting a mac and loved the isolation it provides. If I were playing games I might consider boot camp.
* My wife has owned a MBP for almost two years and we have had almost zero problems with it. I am just downright amazed at how stable they are. Because of that I have no interest in using windows more that i have to.

@Brian
I am talking about general development (web+win forms). No WPF or game development.

@xanadont
I would be interested in what brand HD you have/had. Currently I am using an old ipod over firewire 400 and it is more than acceptable (defiantly better than on the internal spindle).

Andrew Burns
+1  A: 

Just extending this out slightly from the original question, there are some of us doing Delphi Windows development work on virtual machines, too.

I've got a MacBook Pro (1st gen) with a couple of gigs of ram, and a recent iMac (with 4 gigs of ram). I've had more luck than xanadont with external drives, running a couple of different brands on Firewire 400 and finding them to be fine with 16-20Gb VMs. If I'm going to be in one place for a few days (either in the office on the iMac or on the road with the MBP) then I'll copy the VM to the local drive but as a rule it's worked fine for about 2 years now.

I started with Parallels, but there came a point when they started releasing versions that hadn't been regression tested, and sometimes basic stuff would suddenly be broken in the current release. Simple fix, stop downloading the new version and stay 3-6 months behind everyone else. Then I needed to give a VM to a colleague and had to go through a few hoops getting it out of Parallels and into VMware. At that point I tried the Fusion beta, had first-hand experience of moving a VM between Mac and Windows (with no real fuss at all) and that persuaded me to switch to Fusion. I have to say, Fusion is an excellent, stable, reliable tool.

I run WInXP Pro SP 3, Delphi 7, Delphi 2007, SQL Express and various development tools on my VMs (I tend to have a VM for each of my clients).

And I agree with xanadont about the 1Gig ram thing - mine tend to have a gig and no more - I didn't see any real change in behaviour/performance with >1Gb in the vm, so it's better off given to the host operating system rather than the virtual one.

robsoft
is D2007 in a VM fast enough to use a primary setup on a large delphi project? screen refreshes snappy etc?
John McC
It's not bad. I think you'd have to qualify what kind of host machine you were thinking of using, because really it's down to getting the VM to make the most of the host machine without killing it. If it's a big project and the machine runs other stuff (SQL Server etc) too then..
robsoft
..(continued)..I'd consider it carefully first - I do find it liberating when I get the chance to copy the VM file off the laptop and onto my desktop - the extra horsepower and ram give the VM a speed 'fillup' too. What kind of spec host are you looking at?
robsoft
Thx for the response. i was thinking about one of the new 17" MacBook Pro's. 2.9GHZ Core 2 Duo, at least 4G of RAM. NVidia 9600M GT. The issue I'm most concerned about is interactive lags (e.g. slow screen refresh) that slows up the flow of writing software
John McC
robsoft
Ok, that's helpful feedback. I need to do a test. Tinkering with VMWare I found I can build a VM from a True Image backup, so I guess I can try it out without a lot of effort.
John McC
Finally got my hands on one of the new 17" MacBook Pros. I migrated the my old Vista laptop into a VM and Delphi runs really nicely in OSX/VMWare.
John McC
Cool - glad you did! I'm envious - still fairly-happily making do with my 2-year-old MBP but I've been looking closely at the new model. I'm not likely to get 'wife approval' any time soon, though. :-)
robsoft
+5  A: 

@Andrew - I'm exactly in your situation. I use a MBP while my company work is purely Microsoft based: i.e., .NET, COM etc. While nothing can beat running Vista natively in Boot Camp (I've never seen Vista run so fast), the niceties of having your Mac OS be the "main" OS, for internet, mail etc. has gotten me to the following configuration. Works like a charm:

Hardware

  • Load up your MBP with the max possible - 4GB. It's really worth every $.
  • Upgrade your hard drive (if not already) to 7200RPM. Major performance boost here.

Software

  • Parallels Desktop for Mac for virtualization. You can either have multiple VM, or use a boot camp partition. The latter is supposed to be faster, but I haven't really measured it (I use it for having the option to boot natively if I really need speed). The former allows you to have multiple OS. I gave my VM 1GB memory. I can do more if you want it more snappy.
  • Micorsoft Visual Studio 2005/8 for .NET and C++. I have yet to see any IDE for .NET which beats this one. The intellisense is really amazing.
  • Code Gear (yes we have some Delphi)

For non development occasional need I also keep Microsoft Office 2007 installed. They do have MAC ports, but those don't always cut it.

Boaz
+1  A: 

I'm in the same boat; VMware on a MBP, doing .NET development (and a little Mono, but that's a different beast). I would recommend updating to the Fusion 2.0 betas if you haven't yet; they're faster and offer some great new features (multiple snapshots! application linking!) and, in my experience, are just as stable as the 1.x releases.

TALlama
Agreed, the 2.0 betas rock!
Andrew Burns
A: 

This is not purely .NET related but it is in the vein of the using Spaces item in the question.

Trackpad tips for a MacBook running Leopard (may not be supported in earlier OS X versions):

  • Set System Preferences, Keyboard & Mouse, Trackpad to use Two Finger Secondary Click. This allows you to use two finger taps instead of the Control + Click combo for the Secondary Click (better know as the context menu to us .NET developers).

  • Set System Preferences, Keyboard & Mouse, Trackpad to use Two Finger Screen Zoom for magnifying an area in the screen by holding the Control key and scrolling up or down. This is useful for quickly magnifying small fonts or image detail in any Mac application and in Windows running under VMware Fusion. You can pick either the Control, Option or Command keys for zooming by clicking the Options button along with other settings.

Sixto Saez