【发布时间】:2013-09-24 15:17:48
【问题描述】:
我正在sharepoint 2010基础中制作一个功能,过程如下:
1- 我在 Visual Studio 中创建了一个空的 c# 项目,并在其(feature.xml、elements.xml 和 sample.txt)中创建了 3 个文件(已将 sample.txt 文件复制到“共享文档库” "
2- 我将 14 Hive features 文件夹中的三个文件复制到名为“demofeature”的新文件夹中
3- 我运行命令来安装它成功运行的功能 (stsadm -o installfeature -name demofeature)
4- 我现在可以在网站/网站(网站设置 > 管理功能页面)中看到我的功能,并从那里激活它
5- 我去了共享文档,但在那里看不到我的文件,即:sample.txt,而且在部署过程中我也没有看到任何错误。
请告诉我,这里有什么问题?
我在下面粘贴我的代码:
feature.xml
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
Id="2BAC8ED9-3CFF-4922-9E4F-81F8AD9500F9"
Scope="Web"
Title="RHM test feature" >
<ElementManifests>
<ElementFile Location="elements.xml"/>
<ElementFile Location="Sample.txt"/>
</ElementManifests>
</Feature>
元素.xml
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
<Module Name="Deploy" Url="Shared Documents" Path="Shared Documents" >
<File Url="Sample.txt" Type="GhostableInLibrary" Path="Sample.txt">
</File>
</Module>
</Elements>
以及放置在新功能文件夹中的 sample.txt 文件。
谢谢 拉杰
【问题讨论】: