Must I have a feature icon?

Oct 21, 2008 at 3:34 PM

The samples include the African pith helmet as the feature icon.  Must I always include an icon, or is there a way to avoid that and just have SharePoint use the default icon?

Nov 25, 2008 at 8:38 AM
Edited Nov 27, 2008 at 11:55 AM
You don't have to use the African Pitch picture. You just remove "ImageUrl="iconTest\AfricanPith32.gif"" from the feature.xml file and the feature will use the default image. Or even better, you could replace the image with one of your own or one from the IMAGES folder. But there seems there is an error with the way STSDEV edits the manifest.xml, because if you remove the African Pitch picture from the project you get an error. So you need a dummy image in the project if you want it to compile.

Update: It is really a bug in the code for the stsdev project. In the project there is a ManifestBuilder.cs file that has all the code that handles the building of the Manifest.xml. The problem is that when the XML is build it checks to see if there is a TEMPLATE folder, and if there is a TEMPLATE folder it makes the start tag <TemplateFiles>, then it parses to find files in the folders... But it excludes all files contained under the folder FEATURES. Since there is only files under that folder when you have removed the picture it doesn't have any files that are to be written between the start and end tag for the <TemplateFiles> part of the XML, and it just closes the start tag with a />. That way you get a <TemplateFiles /> tag in the XML, and that isn't allowed in the manifest.xml.

      if (Directory.Exists(Globals.TemplatesFolder)) {
        // write TEMPLATE Files
        writer.WriteComment("TEMPLATE files");
        writer.WriteEndElement(); // </TemplateFiles>
    static void WriteTemplateFiles(XmlWriter writer) {
      EnumerateTemplateDirectory(writer, Globals.TemplatesFolder);
    static void EnumerateTemplateDirectory(XmlWriter writer, string path) {

      foreach (string file in Directory.GetFiles(path)) {
        if (!file.Contains("FEATURES")) {
          writer.WriteAttributeString("Location", file.Substring((Globals.TemplatesFolder + @"\").Length));

      foreach (string folder in Directory.GetDirectories(path)) {
        if (!folder.Contains("FEATURES")) {
          EnumerateTemplateDirectory(writer, folder);