2012-06-01 24 views
0

當我的Web部件部署與Visual Studio或者當我安裝在測試環境中的WSP,我沒有在列表中看到sharepointServer /風格%20Library模塊文件/索引/ 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> 

一個想法,爲什麼我不能看到模塊的文件嗎?

回答

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" />