Empty Feature

This recipe creates an empty farm, web application, site or web feature.

Recipe Description

The recipe creates a new empty feature. It should be used as a start for every custom feature.
It can be specified if the feature should be deployed in a farm, web application, site, or web scope.
Most of sharepoint custom components like content types, event handler etc. require a feature.
One feature can be used to deploy multiple of these components but it is also possible to make feature activation dependent of other features.

Arguments

Name Description
Feature settings
Name Required Text. Internal name of the Feature. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Feature. Limited to 255 characters.
Description Required Text. Longer description of the Features purpose.
Scope Required Choice. Scope in which the Feature can be activated and contains one of the following values: Farm (farm), WebApplication (Web application), Site (site collection), Web (Web site).
Hidden Optional Boolean. Specifies if the feature should be hidden on the Feature activation webpages. This attribute equals FALSE by default.
Create Feature Receiver Optional Boolean. When activated, a feature receiver class file will be created and linked to the Feature. This attribute equals FALSE by default.
Create default elements.xml Optional Boolean. When activated the recipe creates a default elements.xml file. This attribute equals TRUE by default.
Advanced settings
Feature ID Required GUID. The GUID will be autogenerated by the recipe, but can be customized if neccesary.
Feature Version Optional Text. Specifies a System.Version-compliant representation of the version of a Feature. This can be up to four numbers delimited by decimals that represent a version.
Creator Optional Text. Name of the creator of the Feature stored in the feature.xml.
Activation Dependencies Optional GUID. One or multiple Features of which the activation of this Feature should depend on. The dependencies can be either out of the box SharePoint Features or custom Features of this project.
Options
Activate On Default Optional Boolean. TRUE if the Feature is activated by default during installation or when a Web application is created; FALSE if the Feature is not activated. This attribute equals TRUE by default. The ActivateOnDefault attribute does not apply to site collection (Site) or Web site (Web) scoped Features. In general, Farm-scoped Features become activated during installation, and when a new Web application is created, all installed Web application-scoped Features in it become activated.
Always Force Install Optional Boolean. TRUE if the Feature is installed by force during installation even if the Feature is already installed. For example, if set to TRUE, Feature installation callouts will always fire anytime a user tries to install the Feature (even if it is already installed) by using either the scanforFeatures or installfeature command-line operation. This attribute equals FALSE by default. The AlwaysForceInstall attribute affects Features of all scopes.
Auto Activate In Central Admin Optional Boolean. TRUE if the Feature is activated by default in the Administrative Web site, site collection, or Web application. This attribute equals FALSE by default. The AutoActivateInCentralAdmin attribute does not apply to Farm-scoped Features.
Require Resources Optional Boolean. TRUE to specify that Windows SharePoint Services check whether resources exist for the Feature by verifying that the standard "sentinel" resource for the Feature is present for a particular culture. The RequireResources attribute allows you to constrict the visibility of certain Features depending on whether resources exist in a particular language for the Feature.

References

Authors

  • Torsten Mandelkow
  • Matthias Einig

Version history

  • 1.1 Updated Documentation
  • 1.0 Initial Recipe