当我使用visual studio部署我的Web部件或在测试环境中安装wsp时,我看不到列表中的模块文件sharepointServer / Style%20Library / Indices / CSS
但是如果输入文件名,我可以访问该文件(例如sharepointServer / Style%20Library / Indices / CSS / commonStyle.css)。
Elements.xml示例:
<Module Name="Module_Indices" Url="Style Library">
<File Path="Module_Indices\Indices\CSS\commonStyle.css" Url="Watson_Indices/CSS/commonStyle.css" />
</Module>
为什么我看不到模块文件?
答案 0 :(得分:3)
请参阅this MSDN Article and Comment in there您需要将 Type =“GhostableInLibrary”添加到文件标记中,它是强制性的,因为缺少CAML,您在图书馆中没有看到它。
<File Path="Module_Indices\Indices\CSS\commonStyle.css" Url="Watson_Indices/CSS/commonStyle.css" Type="GhostableInLibrary" />