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

Feature 1 creates Site Columns

Feature 2 creates Content Type and adds the site columns created by feature1

Feature 3 creates a List definition for mylist

I have two Web tempaltes. I have added following List view to both onet.xml

<View List="Lists/mylist" BaseViewID="0" WebPartZoneID="Left" WebPartOrder="2"  />

for one of them it works but for another one it generates

Failed with 0x80004005 to create the view query or web parts for web

I thought maybe features activates randomly and feature 3 actives before 2 and 1. I activated them programmatically one by one but still when I crate new site by powershell one of webtemplates works not another one.

share|improve this question
    
Solvd: the URL attribute of Element.xml file of the list definition must mutch the List attribute of view element in onet.xml file –  Medes Sep 28 '12 at 21:38

1 Answer 1

Medes,

If its just about feature-activation, you can define feature activation dependency on the later features... Feature Activation dependency means the feature is dependant on other features for its activation, you can see here how you can do this: http://karinebosch.wordpress.com/2011/03/12/feature-activation-dependencies-in-visual-studio-2010/

And more details on Feature Activation dependency can be found here: http://sharepoint.microsoft.com/Blogs/GetThePoint/Lists/Posts/Post.aspx?ID=607

share|improve this answer
    
thanks, It is not feature-activation issue because I tested and activated feature one by one programmatically still not working. –  Medes Sep 28 '12 at 19:58
    
I found the reason why it does not work. the url of the element.xml of list definition must be exact as list attribute for View element in onet.xml file –  Medes Sep 28 '12 at 21:37
    
Great you solved the problem :) –  Arsalan Adam Khatri Sep 29 '12 at 12:56

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.