On SPC, Matthew Burnet, Application Developer for the SharePoint team, had a session on how you can use Windows 7 as a development platform for SharePoint 2010. Here are some key points from the session. If you are doing any development, testing or deployment of SharePoint, I think you will find this most useful!
Windows 7 SharePoint 2010 Developer
You will need to manual install the prerequisites on win7. But the main thing is that you now can develop on a platform with all the tools and business applications you need. There is no question many business have custom applications that are not target for running as client on servers OS. That was a problem in some scenarios with SP2007 development. Now, you can run the full set on your client win7 machine.
Another nice feature is that “Sleep“ is now supported. You can press the sleep button on your computer with SharePoint running. When you wake your computer up again, SharePoint is up and running; alive and well! And fast!
SharePoint 2010 Performance on Windows 7
A question I have been asked again and again is “How much resources does SP2010 and VS2010 require?” The screen shot show the performance monitor on the demoed system, not going over 4 GB for the entire demo. The system had 8 GB, but a 4 GB system will be OK with Win7 and SP2010. Matthew run full installation of SP2010, Office 2010, VS2010 and more. He demoed running several programs at the same time, still with keeping the RAM usage below 4 GB. :) That is impressive. However, I would advice installing 8 GB on your machine, with at least 80 GB hdd and a dual proc x64 cpu.
Consider using two hard drives, even on a laptop. When you start creating VHD’s you’ll need a lot of space. You probably would keep more than one vhd at you developer machine at all times. I like to keep one syspreped vhd and two dev disks. The recommendation is to use fixed sized vhd disks for best performance (if booting to vhd).
Developer Platform
This is really all you need. As I said before, remember to run the prerequisites installation manually. And do not run the SharePoint Configuration Wizard right away. I won’t go into the details about the installation process here, they are well documented already and I guess the process will be further streamlined as we approach RTM.
installation steps
I recommend you install only the services you need to do your development. Running a lot of processes you never are going to use on your machine is really just a waste or resources.
PowerShell will replace stsadm commands in SP2010. As a developer, buildmaster or IT Pro, you must master this subject. Her are some starters and you could also take a look at my blog post “SharePoint and PowerShell – Practical tips”.
First add the SharePoint pssnapin:
add-pssnapin "Microsoft.SharePoint.PowerShell"
Then use “get-help … “ to find the command you need:
get-help get-SP* / get-help *Add* / get-help *Remove* get-help new-SPSite get-help New-SPSite –examples get-help get-SP*
get-help get-SP* / get-help *Add* / get-help *Remove*
get-help new-SPSite
get-help New-SPSite –examples
get-help get-SP*
PowerShell Editor for VS2010
C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise
New Web Application
New-SPWebApplication – start from scratch
Creating Site Collection or Web.
New-SPSite – Prompting for Parameters or use -URL New-SPWeb -url http://localhost/sites/SCLocalhost/test1 Developer Dashboard (also take a look at the blog post about the developer dashboard here) # OnDemand / Off / On $ddsetting.DisplayLevel= [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand $ddsetting.Update() Remove SharePoint items Remove-SPSite –Identity http://localhost Remove-SPSolution // Remove-SPWebApplication IIS 7 PowerShell “import-module WebAdministration” Example: Get-Website
New-SPSite – Prompting for Parameters or use -URL
New-SPWeb -url http://localhost/sites/SCLocalhost/test1
Developer Dashboard (also take a look at the blog post about the developer dashboard here)
# OnDemand / Off / On
$ddsetting.DisplayLevel=
[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$ddsetting.Update()
Remove SharePoint items
Remove-SPSite –Identity http://localhost
Remove-SPSolution // Remove-SPWebApplication
IIS 7 PowerShell “import-module WebAdministration”
Example: Get-Website
For destruction
Use either CA or PowerShell(preferable) to drop and recreate the site collection, web application, Content dB. Alternatively, you can run the SharePoint Products Configuration Wizard. Here are a couple of examples:
Example 1 deletes the specified Web application; this command does not remove the content databases or the IIS Web site. C:\PS>Get-SPWebApplication http://sitename | Remove-SPWebApplication -Zone "Internet" -Confirm
Example 2 permanently removes the Web application, all content databases, and the IIS Web site. C:\PS>Remove-SPWebApplication http://sitename -Confirm -DeleteIISSite –RemoveContentDatabases
You should try this for tuning performance with SP2010 on Win7. Again, if you do not use a service consider turning it of.
TIP! Create a PowerShell script for starting and stopping ALL SharePoint services and related services, in order to save resources on your machine when you are not doing development work. Really useful if you are using a laptop and travel a lot…
Development and application platform do not mean the same thing in two different firm. Every company has their own corporate policies, group policies, custom applications, infrastructure etc. You will need to take them into consideration:
Create syspreped vhd’s to give the each developer. Sysprep the image before running the configuration wizard. If you would like to automate the configuration wizard and creation of initial site etc. remember this is easily done with PowerShell scripts.
Screenshot of the boot menu options in Win7. It no longer reads it configuration from a file on the boot partition. To add or change entries you must use a console tool called “bcdedit”. So how do you set up your machine to boot from a vhd?
Replace [locate] with the drive letter but keep the enclosure, ie. “[C:]\stiank\vpc\sp2010\devmachine1.vhd”
Confirm setup:
C:\>bcdedit /v
Change boot name:
C:\>bcdedit /set {guid} Description “new description”
1. Windows 7 on the Metal
Install Windows 7 to physical drive Install SharePoint Easy, smallest disk space requirement
2. Win 7 + Boot to Win 7 VHD
Create a Windows 7 bootable VHD Install SharePoint, versatile, recoverable
3. Win 2008 R2 + Hyper – V
Create VHDs (S2008, RS, WIN7, Vista) Run multiple VMs for Farm Installations Manage VM\VHDs
In conclusion: Win7 is now a full development platform for SP2010. Or in other words; SP2010 development can be done as any other development. Also, there are no longer any reason for you to have all of the developers go to the installations. Just give them a syspreped vhd!