Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
We need to see your ddf file, and manifest.xml also. –  James Love Feb 14 '12 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 '12 at 17:48
    
I know, but I can't use that. –  Bob Feb 14 '12 at 17:50

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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