Multiple manifest files for a single feature
-
19 noiembrie 2010 18:18How can I include multiple manifest files in a feature using visual studio 2010? I tried adding Empty element and it comes with a single elements.xml file. If I want to add one more, it does not seem to be recognizing the new manifest file that I created. Any pointers?
Toate mesajele
-
22 noiembrie 2010 02:37
Hi diffident,
Thanks for your post.
I can add multiple files to one feature as the steps following:
1. Right click the SharePoint Project;
2. Add new item, and select the “Empty element”, and click “OK”;
3. Now an “Elements.xml” is added;
4. Then, you will see all the items (element.xml) in the feature file.
The element.xml files are a little different from SharePoint 2007. They seem to be not in the same folder if you view them in the project.
Share your result.
SharePoint 2010- Marcat ca răspuns de diffident 22 noiembrie 2010 18:09
-
22 noiembrie 2010 05:23
Hi,
Yes a single feature can have multiple Element.xml like one element file for each WebPart's (if you have multiple Web parts in same project). Like wise you should have element.xml for every component you add to your existing project.
Pathik Rawal My Blog -
14 aprilie 2012 17:20
hello Wayne,
Can you pls give me some e.g.
Below is my feature.xml ...i have added two manifest files ..but do not undertand why these does not work.
<?xml version="1.0" encoding="utf-8"?>
<Feature Id="acc241fd-b25e-4c25-beec-1ec669829172"
Title="LPCRs"
Description="Description for BlankFeature1"
Version="12.0.0.0"
Hidden="FALSE"
Scope="Site"
DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="LPCRs/elements.xml"/>
<ElementManifest Location="LPCRs/ListDefinition.xml"/>
<ElementFile Location="LPCRs/AllItems.aspx" />
<ElementFile Location="LPCRs/DispForm.aspx" />
<ElementFile Location="LPCRs/EditForm.aspx" />
<ElementFile Location="LPCRs/NewForm.aspx" />
<ElementFile Location="LPCRs/schema.xml" />
<ElementFile Location="LPCRs/instance.xml" />
</ElementManifests>
</Feature>