Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have an installation of SharePoint 2010 running for our intranet at the moment, and I have a copy of Visual Studio 2010 that I use for in-house application development. I'd like to start building custom webparts for our SharePoint install, but I don't know where to start with deploying the development environment.

I have a Win 7 Pro x64 box (i7 with 8GB RAM so VMs are an option) that I'm setting up as my new workstation so could anyone please give me a rundown of what I need to do in order to set up VS and SP on my machine so I can start developing?

share|improve this question

5 Answers 5

up vote 5 down vote accepted

You have many choices available to you. You will certainly want a development SharePoint environment, and this can be installed on a Windows Server 2008 virtual machine, or directly on your Windows 7 installation along with Visual Studio. This is a little trickier to set up, and you won't have the convenience of being able to roll back your environment using snapshots. It really is a personal preference which way you want to go (I use the Windows 7 approach because I only have 4Gb of memory on my laptop). You have enough memory to make installing in a VM an option, but you still might want to have all 8 Gb available.

You might also consider installing Windows Server 2008 instead of Windows 7 if your workstation is purely for development and you have another machine available for day-to-day use.

Whichever way you go, be sure to avoid the "stand-alone" option when running SharePoint setup, even though it is "just" a development environment. Install SQL Server or SQL Server Express (with tools) separately and use the "Server Farm" install option.

Some links:

Setting up development environment on Technet

SharePoint 2010 Development

Sahil Malik's blog

share|improve this answer
    
This machine is my only workstation, so running Server 2k8 all the time isn't ideal, and dual-booting would be a pain in the ass. I suppose I could run a Server 2k8 VM, but I only have one key for my VS2010 install and I'd rather not sandbox it since I work on other projects in it as well. Since you develop in Win7 can you tell me if there are any drawbacks to having a SP2010 Development Environment installed on your daily-use machine? Other than developing on a platform that isn't identical to the production server that is. –  newuser May 23 '11 at 15:41
1  
I haven't found any problems doing it this way, particularly for things like building web parts. You can always delete the databases and rebuild the farm if it really gets messed up, but this has never happened to me. Obviously you also need a test environment that looks like production somewhere - for this I use a VM on the server. –  SPDoctor May 23 '11 at 15:50
1  
You've convinced me. I'm just going to develop on my Win7 machine and test on a dummy site collection and database on the production server before moving anything to the live site collection. I want to take advantage of all of my hardware since I've got such a beast now. –  newuser May 23 '11 at 15:55

If you have the hardware, I recommend something like below. This is what I use after lot of learning curve:

  1. Windows 7 host, no Visual Studio (VS installs like 100,000 files)
  2. TFS Power Tools for windows explorer integration
  3. VirtualBox (VB is less bulky and a bit faster), but VMWare is ok too
  4. 2 VMWares - (A) for SQL2008 + Active Directory, (B) for SharePoint 2010 configured to use (A) - both pre-allocated with atleast 50 GB. Dynamic allocation has a big impact on performance.
  5. On (A), SP2010 + VS2010 + TFS Client + VS Power Plugins etc.

I long resisted having VS 2010 in VM as it would be slow, but with SP and IIS being a very poor log-sport, I have fixed several issues only by debugging. Just for debugging alone, having VS along with SP is worth it. Also having my own AD allows me to code for AD related functionality like UserProfileService, having my own users, permissions. Also having source code in host system and mapping into VM via network drive is not liked by VS2010. I keep getting strange errors often.

share|improve this answer

You will need virtualization software, whatever you prefer. I've used Virtual Box and have been very satisfied with it, and it is free, which is a bonus. However, if your company provides licensing for something else, then you are all set there.

Then you can create your virtual machine with 4GB of RAM. Set it up running Windows Server 2008 R2.

There is a great blog post here: http://www.ericharlan.com/Moss_SharePoint_2007_Blog/how-to-install-sharepoint-2010-guide-a166.html that a friend of mine wrote on how to set up a dev environment. This should help you.

share|improve this answer

Please see this thread about installing SharePoint 2010 on Windows 7.

share|improve this answer

The way I've done development with SharePoint has always been to do it outside of the SharePoint environment (typically a VM). This involves setting up some basic .bat files, using some tools from SysInternals to execute scripts remotely, and to set up some shared paths.

The key benefit is that you get to develop in your main environment which is usually more responsive than the VM and already configured for your preferences.

I have a small writeup here: http://charliedigital.com/2010/10/12/sharepoint-development-patterns-getting-started/

It works for 2007 and 2010 as well. There is a bit more upfront effort, but it dramatically decreases your day-to-day development cycles. Plus, with the batch files, it reduces your .wsp solution deployment time since most of the time, you can either 1) just deploy your content files, or 2) just deploy your binaries. Very rarely do you actually need to redeploy a full .wsp during development once you get started.

share|improve this answer
    
Thanks CharlieDigital! This was very helpful! –  user645313 May 23 '11 at 17:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.