views:

821

answers:

3

I'm curious to know how other SharePoint developers setup their dev workstations.

My current setup:

  • Desktop with Server 2008 (only for Hyper-V, was using Vista before)
  • Use Visual Studio 2008 on local machine for dev work
    • Keep a local copy of SharePoint DLLs for referencing, no local SharePoint install
  • Run SharePoint in a Server 2003 VM hosted on my local machine

I develop all my SharePoint changes as a WSP and install them into the VM for testing. I don't run code in debug mode, but do write lots of trace statements to watch what my code is doing.

Also, when I'm making quick changes, I normally don't reinstall the entire WSP. I just recompile whatever DLL I changed and copy it into the GAC in my SharePoint VM, then reset IIS (normally writing Web Parts).

I know things would be easier if I ran SharePoint locally, but I'm normally working on more than one project at a time and don't want things to interfere.

+2  A: 

Definitely prefer working in VM with SharePoint directly as I can debug into processes correctly, also I have a build script that will either redeploy my entire solution or let me just refresh the GAC.

Nat
A: 

Running SharePoint/VS on the same server (either physical or virtual) will get you up and running quickly, but personally I don't think its the way to go.

In addition to what you describe (local VS/SharePoint running in VM's) then a few tips that may make your life easier.

1) Deploy to the bin directory rather than the GAC, then to update all you have to do is copy over your dll/pdb's in a post build batch file - don't think you can do that automatically if they are in the GAC on a remote machine can you?

2) Look at remote debugging - it can be a little bit of a pain to get working first but the effort is worth it! key tip is you need to use the same username/password on both the local and remote machine.

This page is related - http://stackoverflow.com/questions/145361/debugging-sharepoint-2007-code/147629

Ryan
Out of interest, why do you think it's not best to run MOSS/VS together? Win server VM with MOSS/VS is nice and easy to work with and backup/maintain. Runs on any *reasonable* desktop..
marcus.greasly
Well is def. the quickest and easiest but for me the main problem is if you want to use multiple configs (WSS/MOSS/WSSv2/SharePoint using MSDE, SharePoint using SQL, Single server,Farm) then you realistically need to use VM's and generally its quite poor perf using VS in a VM
Ryan
also if you start using checkpoints to restore your VM to a known good state you affect VS and whatever else you've got installed and of course also have to consider licensing issues for VS. Pragmatically, installing both on the same 'machine' may be the best for you but there are potential probs
Ryan
+1  A: 

I do all my development work on one of my VMware images. Since I try to do my SharePoint work in a TDD style I run a lot of tests and then the remote stuff just don't make sense to me.

The single item that have helped me the most is the post build event in visual studio, it is really amazing all the things you can do with a bit of scripting.

Kasper