Wednesday, April 23, 2008

Steps for creating features

1. create a directory structure in visual studio as follows
Featues / "<"featuesname">" / feature.xml
Add schema to feature.xml from loc -">" web server xtn\12\template\xml\wss12.xsd
"<"feature ID=”” Title=”” Description= “” Scope = “” Hidden=”false”
"<"feature id="””" title="””" description="“”" scope="“”" hidden="”false”"">" "<"!-Note users cant activate or deactivate the feature only admin can-">"
"<"elementmanifests">"
"<"elementmanifest location="”Elements.xml”"">"
"<"elementmanifests">""<"elementmanifest location="”Elements.xml”"">"
2. Add new file Elements.xml
"<"elements">""<"elements">"
"<"module name="””" path="”url”"">"
"<"file url="””" type="”Ghostable”"">"

3. Inherit from SPFeatureReceiver class
Override the events FeatureInstalled, FeatureActivated,
Featureuninstalled, Featuredeactivated, Featureuninstalling, Featuredeactivating
4. put the DLL in GAC
5. In feature.xml ad these tags
"<"Feature ID=””
ReceiverClass=
ReciverAssembly=

No comments: