Let me start out by saying I'm sure WSP builder or STSdev is the way to go, but I can't use those where I work, so I'm having to do this all manually. So here's where I am.

I have created a simple solution for MOSS 2007 to make a custom menu item on the Site Actions menu. I have the manifest.xml file which points to the .dll, elements.xml and feature.xml files.

Contents of myCustomSAMenuItem.ddf

.Set CabinetNAmeTemplate=myCustomSAMenuItem.wsp
.Set DiskDirectoryTemplate=CDROM
.Set CompressionType=MSZIP
.Set UniqueFile="ON"
.Set Cabinet=on
.Set DiskDirectory1=Package
.Set DestinationDir=MycustomFeature

Contents of Manifest.xml

<Solution xmlns="http://schemas.microsoft.com/sharepoint/" 
   <FeatureManifest Location="myCustomSAMenuItem\feature.xml" \>
   <FeatureManifest Location="myCustomSAMenuItem\elements.xml" \>
   <Assembly Location="myCustomSAMenuItem.dll" DeploymentTarget="GlobalAssemblyCache" />

Contents of Feature.xml

<Feature xmlns="http://schmeas.microsoft.com/sharepoint/" Id="GUID" Scope="site" Title=" my site actions customization" description="site actions menu customization" >
          <ElementManifest Location="elements.xml" />

Contents of Elements.xml

    <Elements xmlns="http://schmeas.microsoft.com/sharepoint" >
                  Title="SP Site Actions Menu"
                  Description="Custom Site Action">
          <UrlAction Url="http://www.google.com" />

When I run makecab.exe /f myCustomSAMenuItem.ddf, it works and all the files are packaged into a wsp file. When I look inside the file everything has the correct path.

But when I run stsadm -o addsolution -filename package\myCustomSAMenuItem.wsp it returns "The feature path myCustomSAMenuItem\elements.xml' must be of the form 'directory\feature.xml'."

If I remove the element.xml file I can get it added and deployed, but the element.xml file contains the xml that does what I want so without that it's useless.

  • We need to see your ddf file, and manifest.xml also.
    – James Love
    Feb 14, 2012 at 17:38
  • We used this approach on one project and regretted it daily. Future 2007 projects used WSPBuilder instead and had no issues.
    – Dave Wise
    Feb 14, 2012 at 17:48
  • I know, but I can't use that.
    – rgwaldron
    Feb 14, 2012 at 17:50

1 Answer 1


Remove the FeatureManifest element which points to the elements.xml. The FeatureManifest should only point to feature.xml.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.