Setting up Windows 7 for Office & SharePoint 2010 Beta Development
So I decided to get my Windows 7 laptop installed with all the latest public Betas this week which includes Visual Studio Beta 2, SharePoint 2010 Beta and Office 2010 Beta. I had been using internal builds and thought it would be better to get in sync with everyone else in the community. I have to say there were a couple bumps that I experienced along the way that had me scratching my head and searching the web so I thought I’d consolidate all the resources I found and document the steps I did which resulted in a successful install. There is a lot of information out there depending on how you want to configure your system and I’m definitely not going to cover all the possibilities, I’m just going to focus on setting up a Windows 7 development environment and what worked for me in hopes of saving some time for other folks out there. As always, your mileage may vary.
NOTE: If you don’t plan on doing any SharePoint development then the install of Visual Studio and Office 2010 should be very smooth. I only experienced issues installing SharePoint 2010 Beta on my Windows 7 development machine. Also be aware that SharePoint 2010 Beta is supported on Windows 7 (and Vista) only for development purposes. So you will still need to have a testing environment built on Windows 2008 Server (or R2). For more information please see, Setting Up the Development Environment for SharePoint Server , SharePoint Deployment, Determine hardware and software requirements and SharePoint 2010 Beta Release Known Issues.
OS Requirements & Boot From VHD
Before you attempt to set up a Windows 7 development environment, I highly recommend booting from VHD. Do yourself a favor and create a Windows 7 bootable VHD so that if you mess up any part of an install you can simply delete it/roll back and start over. There’s a lot of information out there on how to do this but I used these instructions to create a Win7 64-bit VHD via Hyper-V, sysprep-ed it, copied it to my local hard drive, and then used BCDEdit to add the VHD to my boot menu.
Make sure you create a 64-bit Windows 7 Professional or higher edition with at least 4GB RAM if you’re going to do SharePoint development. You'll need Windows 7 Enterprise or Ultimate to boot from VHD.
What to Install - SharePoint Foundation or SharePoint Server?
There are two versions of SharePoint that you can choose to install. It’s recommend that you install SharePoint Foundation (formerly known as WSS) if you only have 4 GB of RAM on your machine because there’s a lot less services running than the Server version (formerly known as MOSS). But if you need all the functionality of SharePoint Server then make sure you have enough of RAM. Just for fun I installed the Server version on my machine with only 4GB and it’s maxed out at 95% so I went with Foundation in the end. :-)
Note that you do not need to register or obtain a product key for installing SharePoint Foundation but you do for Server. The Product Key for Server is located at the bottom of the download page after you register (I missed it the first time so make sure you grab that before installing).
Installing SharePoint 2010 Beta on Windows 7
Read these instructions carefully: Setting Up the Development Environment for SharePoint Server.These are the instructions you’ll need to follow with a few additions I’ve added below as you go. Now that you’ve got your 64-bit Windows 7 VHD (are logged in as an administrator account) and downloaded SharePoint 2010 Beta you’re ready to proceed to Step 2 in the instructions.
Step 2: Install the Prerequisites for SharePoint 2010
There are a lot of prerequisites that you’ll need to install before you get to actually installing the SharePoint Beta. Follow all the instructions in Step 2 exactly as it says for Windows 7 to install all the prereqs and Windows features. But note that figure 3 in bullet #9 is incorrect. WCF Non-HTTP Activation should appear as checked. The script in bullet #8 is correct, it’s just a problem with the screenshot so don’t get confused.
BEFORE going to Step 3, you will need to install a WCF hotfix as described in this post which fixes an "Unrecognized attribute 'allowInsecureTransport'" error. The WCF hotfix for Windows 7 is available here. After installing this hotfix, reboot.
Now you’re at Step 3 and ready to install SharePoint.
Step 3: Install SharePoint 2010
Follow the instructions listed in this step to install SharePoint until you get to bullet #5. When you get here, you need to download and install the SQL Server 2008 KB 970315 x64 hotfix SQL_Server_2008_SP1_Cumulative_Update_2 build
10.00.2714.00 which you get to by clicking the View and request hotfix downloads link at the top of the KB article.
When installing this though I got the error "Invoke or BeginInvoke cannot be called on a control until the window handle has been created." To resolve it, I closed the all open windows including the SharePoint Configuration wizard (which is sitting open after SharePoint is installed) and then I reran the hotfix. Not sure what is going on here but it looks like it’s a known issue on Win 7 64 according to this post.
After that successfully installed I rebooted again.
Now you need to run the SharePoint Configuration wizard, Start –> Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Products Configuration.
Note to domain users: If you are installing as an administrator but your account is part of a domain, you will need to make sure you have online access to the domain controller! Otherwise configuration will fail on Step 2 with “Exception: Microsoft.SharePoint.SPException: User cannot be found.” This happens even though you select to install the standalone version. This bit me because I was installing on a laptop at home and was not on the corporate domain. I had to start my VPN and then I was good to go, until step 5 that is. ;-)
On Step 5 I ran into another error “Failed to register SharePoint services. An exception of type System.ServiceProcess.TimeoutException was thrown.” This happened when I was installing the Server version and not Foundation. However I found a thread that told me this is related to low memory so I closed some other programs I had running and tried it again and it ran fine. This is why you should make sure you have enough memory before starting. ;-)
You made it! SharePoint 2010 Beta should now be installed. To verify, open your browser to http:// <MachineName> and you should be able to start playing with your new SharePoint site.
Installing Visual Studio 2010 Beta 2
Everything should be super easy to install now but just in case you may want to save your VHD after you get SharePoint successfully installed ;-).
You’ll need Visual Studio 2010 Beta Professional edition or higher to work with Office & SharePoint. I just picked the whole she-bang, Visual Studio 2010 Ultimate. I used the web installer but you can also choose the ISO package if you want to bring it all down once.
Download Visual Studio 2010 Ultimate (web bootstrapper) (See this page for more download options).
There was no hitch to install all the components of Visual Studio 2010 and .NET Framework 4. It took me about 35 minutes to wait for it to complete with one reboot in the middle. For more information, see the Visual Studio 2010 Beta 2 Readme, Visual Studio 2010 Product Information and Featured Overviews and Walkthroughs.
Installing Microsoft Office 2010 Beta
This one is probably the easiest to install.
Scroll to the bottom of the page to get started. You’ll need to register and then you’ll get a product key page with a download button at the bottom. Save your product key and then select the language to download. Note that it says “Download the 32-bit (x86) version: ” but the download will include both 32-bit and 64-bit so don’t worry.
Once you click the download button you’ll actually have to install a little download manager to get the setup package. Once you download the package, click on the ProfessionalPlus.exe to start the install. You’ll see a big button “Install Now”. Click that and in about 15 minutes you’ll have Office installed. It doesn’t get much easier than that.
Okay so you want to be able to test these things are all installed and playing happily. In order to develop against SharePoint you’ll need to open Visual Studio as run as Administrator. Next, open the Server Explorer and you should see a SharePoint Connections node. Expand that node and you should be able to browse your SharePoint site.
You should also explore some of the awesome new project templates under the Office > 2010 and SharePoint > 2010 nodes in the File > New Project dialog.
Now it’s time for us to learn how to use these Office and SharePoint tools in Visual Studio! Check out some of my favorite resources:
Office 2010 Development Resources
- Office Development in Visual Studio 2010 Beta Samples, Walkthroughs and Videos
- Office Development in Visual Studio 2010 Forums
- Office Development with Visual Studio Team Blog
- Office 2010 Beta Resources
- Office 2010 Application Compatibility Tools
SharePoint 2010 Development Resources