Monday, March 8, 2010

How to create a Simple Feature for SharePoint

This feature is simply add the existing file to the existing list.

  • Open the visual Studio and add following file to you empty project. When you are writing the xmls in is better use schema that provides intellicence.
  • To add the XML sheme, in the XML file go to properties and


  • after that create following files in you project


feature.xml(you cannot change the file name) 

<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns=""
         Title="Really Simple Feature"
         Description="A feature to place a doc in a library">

    <ElementManifest Location="elements.xml"/>



<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="">

  <Module Name="Document" List="101" Url="Shared Documents">
    <File Url="TextFile1.txt" Type="GhostableInLibrary" />


After create those files copy those 3 files and put them to

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\SimpleFeature

And install the feature to the site using command prompt.

stsadm -o installfeature -n SimpleFeature

This is under

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>

Now the feature installed to your site. To activate the feature goto

Site settings –> Site Features –> realy simple feature.