因此,我需要在 SafeControls 列表中添加 ContentEditorWebPart 。除非有更好的方法...
问题是,我不想手动添加它,我想在我部署我的解决方案时自动执行此操作。
因此,我尝试将我的安全控件添加到需要此功能的模块的 .spdata 中,如下所示:
<SafeControls>
<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="ContentEditorWebPart" Safe="True" />
</SafeControls>
但是当我检查我的 web.config 时,它会将程序集更改为我的项目程序集..
如果我将它添加到我的包中,我必须使用它部署 Sarepoint dll。
那么将它添加到 SafeControls 的最佳方法是什么?