lördag 17 mars 2012
The pain of setting up a SharePoint 2010 development environment in Windows 7
SharePoint 2010 require a 64-bit operating system, however not a client operating system, but with some tweaks it is possible get it to run on a 64-bit Windows 7 client. The necessary steps are well documented on the Internet and easy to follow. So far, so good.
A development environment also requires a development tool, Visual Studio 2010 in this case, in order to do some actual development. Setting up Visual Studio 2010 in a 64-bit environment, however, also provides some rather interesting challenges if you are unlucky. How to overcome those challenges is unfortunately not very well documented on the Internet.
I have set up my own development environment on a portable HP Workstation running Windows 7 Enterprise x64 experiencing problems both with the Visual Studio 2010 as well as with the SharePoint 2010 setup and I would like to share my experiences, hopefully helping someone else to overcome some of the difficulties.
Visual Studio First
First of all I began setting up Visual Studio 2010 Professional. The installation aborted early when installing the Visual Studio 2010 Prerequisites for 64-bit. The error message said something like "Error writing to file: mfcmifc80.dll"
The problem is related to .NET. The files mscoree.dll (x86) and mscoreei.dll (x64) have not been updated to the .NET 4.03 version. There are a number of blogs and sites where you can find descriptions of how to solve this problem i.e. http://int.social.msdn.microsoft.com/Forums/en/vssetup/thread/99b37204-a43e-4489-b27a-8831b93908b2.
However, there is a much easier way to deal with this problem if your files have a version number below 4.03. Download the .NET Framework Cleanup Tool, as described here, and clean out the .NET version corresponding to the version on your mscoree.dll file. Then download and install .NET 4 from Microsoft getting the latest available version.
After reinstalling .NET 4 the Visual Studio installation should go smoothly.
Second, SQL Server
After getting Visual Studio correctly set up I installed a SQL Server Express 2008 with Advanced Services. Nothing much to say there.
Third, SharePoint Server
In short, installing SharePoint 2010 on a Windows 7 requires you to download and install some prerequisites as well as doing some changes to the setup XML-files in order to make this work on a client operating system.
Following the following instructions makes it quite straight forward, if you install the SharePoint Foundation. If you plan to install the full SharePoint server you must also upgrade the Chart Controls, a part of .NET 3.5.
Following the steps in the above instructions should make the installation go smoothly withaout any hassle.
When running the SharePoint 2010 Configuration after the setup, if your computer is on a domain, make sure that you have a connection to the domain controller, otherwise the configuration will fail.
More on this can be found here.
There might of course be other issues as well but these are the ones I have encountered a couple of times and I hope that this can be of help for someone.