1

I have site definition in Visual Studio 2010 for SharePoint 2010 site, which has multiple features. When the site is deployed through powershell, all features are activated properly but an interesting event occurs -- receivers in feature apparently fail to fire.

And when I manually deactivate one particular feature and try to activate it again, I receive the following error:

File specified in the modules section of this template already exists.

I have tried http://zimmergren.net/technical/sp-2010-find-error-messages-with-a-correlation-id-token-in-sharepoint-2010 to find out more about error but can't really find out which file is throwing up the error.

4

1 回答 1

4

听起来您需要将功能的 elements.xml 中的 IgnoreIfAlreadyExists 属性设置为 True。

<File Path="Style Library\whatever.png" Type="GhostableInLibrary"  IgnoreIfAlreadyExists="true" />

我希望它有所帮助。

于 2013-09-11T14:19:40.783 回答