我们发现一个问题,我们在运行Sharepoint 2010发布网站集的生产服务器上部署时遇到了问题。我们将从Visual Studio打包的WSP部署到Sharepoint管理Shell(卸载、重新安装解决方案)。过去它一直像魅力一样工作。我们添加了自定义主页、CSS文件、图像,然后成功添加了自定义页面布局。我也在我的电脑上本地运行SP,通过部署功能添加新文件没有任何问题。我可以将它们整洁地添加到文档库中,甚至可以从Elements文件创建新文件夹。但是当我将WSP部署到生产服务器时,问题就出现了。我想将几个JS文件和一个XSL文件添加到样式库中,但这些文件无法添加到文档库中。尽管部署过程顺利且没有错误,但当我在Sharepoint Hive中检查我的功能时,新文件已经存在于物理驱动器上!然而,它们不会被添加到虚拟文档库中。我可以更新现有的文件,如主页和CSS文件,因此部署的功能是有效的。我的猜测是要么与权限问题有关,要么与我的代码中的某些错误有关。但我做的正是我们以前部署时所做的。下面是我的Elements.xml文件的内容:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="ALayout" Url="_catalogs/masterpage" RootWebOnly="true" >
<File Path="ALayout\_a_intra.master" Url="_a_intra.master" Type="GhostableInLibrary" />
</Module>
<Module Name="ALayoutStyles" Url="Style Library" RootWebOnly="true" >
<File Path="ALayout\styles\z_aintra_core.css" Url="z_aintra_core.css" />
<File Path="ALayout\styles\aintra_std.css" Url="aintra_std.css" />
</Module>
<Module Name="ALayoutStyleImages" Url="Style Library/img" RootWebOnly="true" >
<File Path="ALayout\styles\img\a-logobig.png" Url="a-logobig.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\bg.png" Url="bg.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\divider.png" Url="divider.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\nav-bg-hovered.png" Url="nav-bg-hovered.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\nav-bg-radius-left.png" Url="nav-bg-radius-left.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\nav-bg-radius-right.png" Url="nav-bg-radius-right.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\nav-bg-selected.png" Url="nav-bg-selected.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\nav-bg.png" Url="nav-bg.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\nav-divider.png" Url="nav-divider.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\top_bg.png" Url="top_bg.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\user-account-radius-left.png" Url="user-account-radius-left.png" Type="GhostableInLibrary" />
<File Path="ALayout\styles\img\user-account-radius-right.png" Url="user-account-radius-right.png" Type="GhostableInLibrary" />
</Module>
<Module Name="ALayoutScript" Url="Style Library/js" RootWebOnly="true" >
<File Path="ALayout\js\script.js" Url="script.js" Type="GhostableInLibrary" />
<File Path="ALayout\js\plugins.js" Url="plugins.js" Type="GhostableInLibrary" />
</Module>
<Module Name="ALayoutScriptLibs" Url="Style Library/js/libs" RootWebOnly="true" >
<File Path="ALayout\js\libs\jquery-1.4.2.min.js" Url="jquery-1.4.2.min.js" Type="GhostableInLibrary" />
</Module>
</Elements>
我无法将最后两个Javascript模块部署到文档库中。我尝试了不同的文档库,但它在生产服务器上仍然无法工作,只能在本地运行。而且我无法通过功能将其部署到Sharepoint Hive。
有人能想到我错过了什么吗?