One of the most challenging things I've had to deal with in a long time is trying to work out how to get Visual Studio 2010 to activate my Fields feature before it tries to activate my Content Type feature :)
First I was (obviously) getting errors that the field didn't exist (because it couldn't find the Field that the FieldRef was pointing at).
Next I tried adding a Feature Activation Dependency, hoping that Visual Studio would intelligently activate them in the order of the dependencies that I setup ... WRONG ... I am now getting errors saying it cannot activate because the dependency is not active (doh!).
Finally struck upon something .. going to the Package .. the features were being activated in the order they appeared in my VS 2010 Package item.
UPDATE
It seems there ARE move-up / move-down buttons, but they don't stick to the scrollbar so if you scroll down (to the bottom of the package) you can't see them anymore. Anyway .. yes you can re-order them .. but you'll maybe find this slightly more difficult if your features are at the bottom of the package list.
Slightly frustrating, but glad it's all working now!
Thanks a lot :)
ReplyDeleteYou save my day!
ReplyDeleteThanks very much!
Fuck (Fornication Under Command of the King)
ReplyDeleteall Feature Dependency.
But Thank you man two days i'm strugling with the issue. Thank you. It's working !!!
Man! you save my time. thanx
ReplyDeletethanks man!
ReplyDeleteNote: I had to restart visual studio and re-open the project before it picked up the change in activation order.
ReplyDeleteThanks for the tip.