WSP is the most common and reliable way any developer uses to deploy SharePoint components between different environments. As suggested by Microsoft in this article Upgrading a Farm Solution in SharePoint 2010, there are two ways of upgrading a farm solution.
- Remove existing solution, and redeploy using the new package
- Use update commands (in powershell or using stsadm) to upgrade the solution
The first approach suggested will remove all the existing components when the farm solution is uninstalled and removed. Then after adding and installing the new solution, all the components and files in this package are deployed to the farm.
But the second approach, in which we use the update commands, the components are actually replaced with the updated versions from the package. Its suggested that the number of files and features should be same on the package when we are upgrading it.
So, when we follow the second approach, any new feature/s added in the package will not be installed in the farm. They need to be installed manually. But many administrators wanted to update the solution, and also the new features to be installed in the farm. But 'Update-SPSolution' doesn't install newly added features. Here is a solution...
I created a custom cmdlet which gets added in the SharePoint 2010 Management shell - Upgrade-SPSolution. This cmdlet updates the solution by replacing the components from the new package to the farm, and then creates a one time timer job, which installs all the newly added features in the farm. Download the Upgrade-SPSolution from codeplex and install it in your farm. You will have a new cmdlet 'Upgrade-SPSolution'.