开发者

VseWSS Site template adds 50+ features to feature list

I have created and deployed a MOSS Site defintion using VseWSS 1.3

I install the site definition and create a new site and everything works fine. However, when anybody goes into any site on that WebApplication (in any site collection) and goes to the feature list then all these features are in the list.

I have about 15 content types, with 15 lists based on these content types each with their own instance and ItemRecievers. 开发者_如何学JAVAAs you can imagine this is a lot of features in the list. My Sharepoint administrator saw this and had a meltdown...

He wants to see a single entry like you see for the MOSS Enterprise features etc, that activates all the features for my solutions. I have seen somebody menation the term 'feature pack' - in relation to this but I don't know if that's just their terminology.

How can I do this? Can this easily be done is VseWSS or do I have to go in manually and hack the IDE generated files?

james :-)


VseWSS isn't great for producing solutions - it can pull out elements of a solution, but tends to (in my limited experience with it) set things up like they're all going to be seperate features.

The unfortunate thing is, your Admin is right. What you've got - those content types, list definitions, and list instances - are a lot of feature Elements. A single Feature can have many of those, usually in a file called 'elements.xml'. There's a good description of this at:

http://msdn.microsoft.com/en-us/library/ms460318(v=office.12).aspx

(Note, in Visual Studio 2010 parlance, these elements are 'SharePoint Items' within the visual studio project. But I digress)

I've always tended to use VseWSS to create the files that I need - my list definitions, etc. - and then copy these files into a WSPBuilder project for packaging, ready for installation. If you've not used WSPBuilder, I recommend it for SP2007 development - though it's largely superceded by Visual Studio's own tools for SP2010. It takes a little understanding, but then you'll realise that if you simply copy the files into the right places, you can easily build your solution.

(You should be deploying your solution in a WSP file. ALWAYS deploy solutions in WSP files.)

(Also, you shouldn't have to 'hack' any of the files, just rearrange them on the file system so WSPBuilder packages them correctly. See the WSPbuilder documentation.)


An easy option to do is simply modify the feature elements to hidden, and create your primary feature as a visible feature with activation dependencies. This means that once the primary feature is activated all the dependency features will be activated automagically.

http://blogs.msdn.com/b/jjameson/archive/2007/03/22/scope-dependencies-for-sharepoint-features.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜