18 09 2008
SharePoint Development Environment
In this blog entry I will tell you how to put everything up and what tools we are using for which tasks. Well, if you read further then you have something to do for couple of evenings. Let’s start!
I will give you not very short overview about what one must do to get development environment up’n’go. There are many good guides about SharePoint development environment installation and I will give you links to these materials. This entry describes the overall process and you can also find here some of my advices.
NB! It is also possible to avoid the installation hell described here. You can download MOSS2007 virtual hard disc, install Visual Studio and use it. You have one problem – this is time limited installation and when it expires you have to start from beginning again.
As a first thing you need an installation of Windows Server 2003 or newer. I don’t have many computers in my company and that’s why I use Microsoft Virtual PC to run SharePoint and its development environment. If you are using Windows Vista then turn off Aero and other needless cool features – they eat too much resources.
As a first thing download Virtual PC 2007 and install it to your machine. It is free and you don’t have to buy any licences. After installing Virtual PC you have to create virtual machine for Windows Server installation. Make sure you give enough resources to virtual machine because SharePoint and development tools is not a small game to play.
If it is possible give 2GB RAM and about 16GB disk space to your virtual machine. It should be enough if you don’t download any installation images to your virtual hard disc.
Now install Windows Server and virtual machine add-ons (you can find add-ons installation from Virtual PC menu). Also install Microsoft Loop-back Adapter so you can access your virtual machine from host machine.
As a last thing before installing SharePoint you should enable remote desktop access to your virtual machine. It is real pain to use your virtual machine through Virtual PC window. Remote Desktop access is much better and more convenient to you because you don’t have to remember special key combinations for your everyday moves.
When everything is done make a back-up copy of current state – if you miss something when going through next steps you should create new virtual machine from zero again.
SharePoint and Visual Studio
If you prefer to use Windows SharePoint Services 3.0 then you can download it and install it on your Windows Server. If you want to develop for WSS3.0 and MOSS2007 you need MOSS2007 image. You can get it from MSDN Library subscribers downloads section. Now, here the fun begins.
Before SharePoint you need also to install IIS and SQL Server. You can find very detail guide from SharePoint Reporter Blog entry How to Create a MOSS 2007 VPC Image: The Whole 9 Yards. There is also MSDN Library article Setting Up Development Environments for the 2007 Microsoft Office System.
NB! Be specially careful when dealing with Active Directory. There are some dangerous steps in AD installation that may ruin your installation when some of these steps fails.
NB! After installing Windows it is recommended to let it download and install all updates it needs. Same goes for SharePoint – after installation let it install updates. Don’t forget backup copies before these steps.
If you are using Visual Studio 2008 then you don’t have to install utilities required by Visual Studio 2005 environment (separate installation of .Net Framework 2.0 and .Net Framework 3.0 and Workflow extensions). You may also install Visual Studio 2008 SP1 and .Net Framework 3.5 SP1.
Don’t forget to make back-up copy after every important step. As I told you before – if something goes very wrong you can always start from last good state if you have backup. As a last thing that is related to Visual Studio 2008, you have to install Visual Studio Extentsion for Windows SharePoint Services (VSeWSS) 1.2.
There are also two SDK-s you may need because these SDK-s contain valuable information about SharePoint development and also code examples:
- Windows SharePoint Services 3.0: Software Development Kit (SDK)
- SharePoint Server 2007 SDK: Software Development Kit
After installing SDK-s make sure everything works as expected. If everything is okay then make a backup copy of your virtual hard disc.
SharePoint has two different ways how to get many things done – it is possible to develop and it is possible to customize. We are using Visual Studio 2008 for development and SharePoint Designer for customization. These two activities are not comparable because they are totally different.
Customizations are made to SharePoint site instances. So, if you create a new site then you have to manually apply those modifications also to new site. On Visual Studio it is possible to use SharePoint API, create templates and activation features that can also modify existing sites. Also there are customizations you can do directly through your browser.
Many tasks are very unconvenient to do on Visual Studio and this is the place where SharePoint Designer and browser based customizations will save you a lot of time – just do those modifications, take them from SharePoint and add appropriate definitons to your Visual Studio project.
You can download SharePoingt Designer from MSDN Library subscribers downloads section.
If everything works make a backup copy again.
As a last thing you want to be sure you don’t lose your work when you are somehow able to crash the virtual machine. Visual Studio can use Visual Source Safe as source control system. Also, Visual Studi can be client to Team Foundation Server.
If you are using CVS or SVN then you can also find plug-ins for Visual Studio. I am using TamTam CVS and AnkhSVN. These plug-ins need some CVS or SVN client and I will recommend you TortoiseCVS and TortoiseSVN. If you need CVS or SVN server then you can consider CVSNT or VisualSVN Server.
When you have source control support installed then it is time to make a backup again. Put this backup somewhere you can always take it when some accident happens.
Now you have SharePoint development environment with everything you need for development tasks and starting from next entries of this serie we are going serious on SharePoint topics.