Sharepoint Virtual PC – Sharepoint Development Environment

If you are developing for sharepoint you have likely come across the stumbling block. Your running something like Windows 7, Vista or XP, Visual studio 2008, 2010 something like that. You want to develop for sharepoint directly but when you go to make a fresh webpart or indeed any solution for sharepoint it basically says “No sorry, you need to have sharepoint installed.” This is a mighty pain for development.

Now you can do transplant coding, in that you reference directly the DLL’s ripped from the Microsoft sharepoint installation elsewhere, and code that way – this works for master pages, migration and other independent projects – but if you want the ability to deploy to a server, or in fact to work with web part solutions/projects then you will need at least a faux install of sharepoint.

We will go into more detail about the process in a later post but there are several options you have when you get to this point:

1. Hack around the Sharepoint installation of sharepoint foundation to make it install on windows 7/vista.
For us this didn’t work as well as it has for some people, but we have seen it working and it does get the best of both worlds – 7 is great for developing in, quick etc – but it can be a pig to make it install. Microsoft themselves advise this – there is this guide which walks you through hacking their sharepoint foundation install to work on 7/vista, which says a lot about the state of play for developing (properly) for sharepoint, that MSFT themselves are hacking around their stuff to make it work.

2. Virtual PC Sharepoint install
This is the most likely option to work out of the box. The premise is you setup a decent virtual box (on your dev machine or on a pooled virtual hardware resource if you have one) on windows server (2008 r2?) and install sharepoint (2010?) and Visual studio (2010?) Then develop on this box, which has both advantages and disadvantages. Benefits include a developer local instance of sharepoint – so you can test things in their own environment without breaking sharepoint (although 2010 sharepoint deals with segregating solutions quite well anyway) and it is also nice to be able to snapshot and move your dev box in one single file. Downsides however are numerous: How much power can you actually give to a virtual box? Yes you can get multiple screens, give it 70% of your pc’s resources or whatever but it will still be a windows server box, run virtually – so don’t expect the fantasticness of 7. The biggest thing to think about with this is the extra licenses. Legally you may require another Visual studio licence, another windows server licence and you can use sharepoint foundation so that should be ok.

3. Develop On Server
Lastly you can always just develop directly on one of the farm server’s – although this has associated risk. Crash your machine? yep you took out sharepoint (or one server at least), abusing the processing to test something? yeah thats abusing the sharepoints processing resource.

There is no right way of doing this at the moment then really, Virtual pc developing sharepoint works, but its dirty and potentially more expensive, I am sure this will get better though, as MSFT seem to be getting much better at this stuff.

Leave a Reply