VseWSS 站点模板添加 50+功能到功能列表
我已使用 VseWSS 1.3 创建并部署了 MOSS 站点定义
我安装了站点定义并创建了一个新站点,一切正常。但是,当任何人进入该 Web 应用程序上的任何网站(在任何网站集中)并转到功能列表时,所有这些功能都会在列表中。
我有大约 15 种内容类型,其中有 15 个基于这些内容类型的列表,每个列表都有自己的实例和 ItemReciever。正如您可以想象的那样,列表中有很多功能。我的 Sharepoint 管理员看到了这一点并崩溃了...
他希望看到一个像您在 MOSS Enterprise 功能等中看到的那样的单个条目,该条目可以激活我的解决方案的所有功能。我看到有人提到“功能包”这个术语 - 与此相关,但我不知道这是否只是他们的术语。
我该怎么做?使用 VseWSS 可以轻松完成此操作吗?还是我必须手动进入并破解 IDE 生成的文件?
詹姆斯 :-)
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. As 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 :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一个简单的选择是将功能元素修改为隐藏,然后将主要功能创建为具有激活依赖性的可见功能。这意味着一旦主要功能被激活,所有依赖功能将自动激活。
http://blogs .msdn.com/b/jjameson/archive/2007/03/22/scope-dependency-for-sharepoint-features.aspx
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
VseWSS 不太适合生成解决方案 - 它可以提取解决方案的元素,但倾向于(以我有限的经验)将事物设置得好像它们都是单独的功能一样。
不幸的是,您的管理员是对的。您所拥有的 - 那些内容类型、列表定义和列表实例 - 是许多功能元素。单个功能可以具有其中许多,通常位于名为“elements.xml”的文件中。对此有一个很好的描述:
http:// msdn.microsoft.com/en-us/library/ms460318(v=office.12).aspx
(注意,在 Visual Studio 2010 中,这些元素是“SharePoint Visual Studio 项目中的项目。但我离题了)
我总是倾向于使用 VseWSS 来创建我需要的文件 - 我的列表定义等 - 然后将这些文件复制到 WSPBuilder 项目进行打包,准备安装。如果您还没有使用过 WSPBuilder,我推荐将其用于 SP2007 开发 - 尽管它在很大程度上被 Visual Studio 自己的 SP2010 工具所取代。这需要一点点理解,但随后您会意识到,如果您只需将文件复制到正确的位置,就可以轻松构建您的解决方案。
(您应该在 WSP 文件中部署解决方案。始终在 WSP 文件中部署解决方案。)
(此外,您不必“破解”任何文件,只需在文件系统上重新排列它们,以便 WSPBuilder 正确打包它们。请参阅 WSPbuilder 文档。)
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.)