Upgrading A SharePoint WSP With A New Feature
by Steven Ng on January 6, 2010
I know this post is very specific, i’ll go into how to create a WSP from scratch, how to build specific features, etc. in future posts. In this scenario, you have an existing WSP project and added a new feature that creates a link in the Site Settings section called Awesome Link, also assume we used WSP Builder to build a nice WSP file for you, let’s call this file AwesomeLink.wsp
Step 1
This is easy, just copy AwesomeLink.wsp to a folder on your SharePoint server. We’ll call this folder c:\projects\WSPs
Step 2
Now we will use STSADM to upgrade the solution by opening up a Command Prompt, one of the quickest ways to do this is to click on Start > Run, then type in CMD and press OK.
Next navigate to the folder where you copied over the AwesomeLink.wsp file, in this case it’s c:\projects\WSPs
Step 3
Type this first command and press the Enter key:
stsadm -o upgradesolution -filename "AwesomeLinks.wsp" -name "AwesomeLinks.wsp" -immediate -allowgacdeployment
Then type the second command and press Enter:
stsadm -o installfeature -name "AwesomeLink" -force
Step 4
Next go to your SharePoint site and click on Site Actions > Site Settings > Modify All Site Settings
Click on Site Collection Features link located under the Site Collection Administration group.
That’s It!
You’re all done upgrading a SharePoint WSP, go take a break or play some Xbox 360!
Leave your comment