1

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

.OPTION EXPLICIT
.Set CabinetNAmeTemplate=myCustomSAMenuItem.wsp
.Set DiskDirectoryTemplate=CDROM
.Set CompressionType=MSZIP
.Set UniqueFile="ON"
.Set Cabinet=on
.Set DiskDirectory1=Package
manifest.xml
bin\debug\myCustomSAMenuItem.dll
.Set DestinationDir=MycustomFeature
\features\myCustomSAMenuItem\feature.xml
\features\myCustomSAMenuItem\elements.xml

Contents of Manifest.xml

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

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" >
       <ElementManifests>
          <ElementManifest Location="elements.xml" />
       </ElementManifests>
    </Feature>

Contents of Elements.xml

    <Elements xmlns="http://schmeas.microsoft.com/sharepoint" >
       <CustomAction 
                  Id="myCustomSAMenuItem"
                  GroupId="SiteActions"
                  Location="Microsoft.SharePoint.StandardMenu"
                  Title="SP Site Actions Menu"
                  Description="Custom Site Action">
          <UrlAction Url="http://www.google.com" />
       </CustomAction>
    </Elements>

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.

3
  • We need to see your ddf file, and manifest.xml also.
    – James Love
    Commented 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
    Commented Feb 14, 2012 at 17:48
  • I know, but I can't use that.
    – rgwaldron
    Commented Feb 14, 2012 at 17:50

1 Answer 1

1

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

0

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.