views:

627

answers:

2

When creating a new WSPBuilder project or new WSPBuilder item in Visual Studio, you get to choose the scope of the item being created. The options are Web, Site, WebApplication and Farm. What do the different scopes do, and how does that affect deployment? How do you determine which scope to use?

+5  A: 

The scopes refer to the 'feature scope level'. Feature scope determines where the functionality that the feature provides can be used.

  • Farm: In a single SharePoint farm and across all its web applications, site collections and webs
  • WebApplication: In a single web application and across all its site collections and webs
  • Site: In a single site collection and across all its webs
  • Web: In a single web

Your choice of scope depends on the type of feature you'd like to use and where you'd like to use it. If you want to restrict the use of a custom action feature in one particular web then don't allow its scope to be used at WebApplication level. Also, depending on what type of feature you are creating, not every scope is an available option (see this list of feature types and the different scopes that apply).

Alex Angas
A: 

It's basically an "activation context" for features.

Janie