Installation, Deployment, Activation of Features

I get plenty of questions on how to add, deploy or activate a SharePoint Solution.

Solution

A SharePoint solution is a *.wsp file (which is a cab file) which contains at least one feature.

Feature

A feature adds new functionality to your SharePoint farm. It can be wrapped inside a solution file, or be deployed by adding files to your SharePoint servers.

Installing a Solution

To install a solution to your SharePoint farm, copy the wsp file to one of your SharePoint servers, and run “stsadm -o addsolution -filename yoursolution.wsp”.

Because the installation process only includes the filename, every “-name” for updates etc. are identical to the filename. See below.

Upgrading a Solution

If you already have a solution installed and want to update it, simply update the solution with an updated wsp file and the stsadm command “stsadm -o upgradesolution -filename yoursolution.wsp -name yoursolution.wsp -immediate [-allowgacdeployment]”.

You can schedule the deployment with -time instead of -immediate.

The allowgacdeployment parameter is necessary if the solution places assemblies (DLLs) into the global assembly cache (GAC).

Scopes

The scope of a feature defines on which object you can activate the feature. The scope can be “Farm”, “WebApplication”, “Site” or “Web”.

Note from the SharePoint SDK:

For Web site scoped Features, a user must have the ManageWeb permission on the Web site to perform Feature activation or deactivation and property update through the object model or through the user interface (UI). For site collection scoped Features, a user must have the ManageWeb permission on the root Web site of the site collection to perform Feature activation or deactivation and property update through the object model, but to navigate to the Site Collection Features page and to activate or deactivate Features through the UI, the user must be a site collection administrator.

** Deployment
**

Before you can use a feature, you have to deploy it. If the feature was installed to your SharePoint farm, it will show up in the “Solution Management”.

Clicking on a name of one solution will bring up the properties of the solution. You can see if it has been deployed and deploy it to other webapplications.

With the “Deploy Solution” Button, you can deploy the solution to one webapplication at a time.

**Feature Activation
**

After a solution has been installed and deployed, you can activate the features containing the solution at the scope which it is designed for (see above).

**Activation on Farm level
**

**Activation on Web Application level
**

Make sure you choose the Web Application where you want to activate the feature!

**Activation on Site Collection level
**

Some features require activation at the Site Collection level. This could be Webparts, which will put a .webpart file in the Webpart catalog, so you can easily add them to a page.

**
**

**Activation on Web level
**

If the feature is designed to work on website level, you have to activate it in the “Site Administration” section of your “Site Settings”.

**
**

 

I hope this post will clarify where to activate and how to install SharePoint Solutions J

Tags: SharePoint
Feature
Solution
Deployment