本文介绍了SharePoint 文件配置不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio 中创建了一个功能,使用 WSPBuilder 构建 .wsp 文件,其中包含一些需要复制到 _layouts 文件夹的 aspx 文件.我在我的项目中创建了 12 hive 结构,将所有 xml 文件(例如 feature.xml)复制到正确的子文件夹,将 aspx 文件放在正确的位置并构建了 .wsp 文件.

I have created a feature in Visual Studio, using WSPBuilder to build the .wsp file, which contains some aspx files that need to be copied to the _layouts folder. I created the 12 hive structure in my project, copied all the xml files (feature.xml for example) to the right subfolders, put the aspx files in the right place and built the .wsp file.

当我部署并激活该功能时,aspx 文件被复制到 _layouts 文件夹,一切正常.然后,无缘无故地,SharePoint 做得最好,然后停止工作.现在,每当我部署该功能并激活它时,我注意到没有任何 aspx 文件被复制到 _layouts 文件夹.我在日志文件中看不到任何指向问题的消息.

When I deployed and activated the feature, the aspx files were copied to the _layouts folder and all was well. Then, for no reason, SharePoint did was it does best and stopped working. Now, whenever I deploy the feature and activate it, I notice that none of the aspx files are copied to the _layouts folder. I can't see any messages in the log file which point to a problem.

这是我的 feature.xml 文件:

Here is my feature.xml file:

<?xml version="1.0" encoding="utf-8"?>
<Feature  Id="3263C427-F0FA-4cad-8C7F-459F31E36D34"
          Title="Test"
          Description="Test"
          Version="1.0.0.0"
          Hidden="FALSE"
          Scope="Web"
          DefaultResourceFile="core"
          xmlns="http://schemas.microsoft.com/sharepoint/">
  <ElementManifests>
    <ElementManifest Location="CustomActions.xml" />
    <ElementManifest Location="module.xml" />
  </ElementManifests>
</Feature>

CustomActions.xml 包含在站点的列表设置页面上创建的一些链接,以便对其进行良好处理.问题是module.xml":

The CustomActions.xml contains some links that are created on the list settings page on a site, so that it being processed fine. The problem is 'module.xml':

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Page1" Url="_layouts">
    <File Url="Page1.aspx" Type="Ghostable" />
  </Module>
  <Module Name="Page2" Url="_layouts">
    <File Url="Page2.aspx" Type="Ghostable" />
  </Module>
</Elements>

我无法发现我在这里做错了什么 - 事实上,整个部署对上述文件都运行良好,所以我只是对它停止工作的原因感到困惑.我照例重新跟踪我的步骤并思考我是否做了什么导致了这种情况,但我没有.

I can't spot what I've done wrong here - in fact, the whole deployment has been working fine with the above files, so I'm just baffled as to why it's stopped working. I did the usual of re-tracing my steps and thinking whether I had done something to cause this, but I haven't.

如果有人之前有过这种情况发生在他们身上的经历,并且可以给我一些提示,那就太好了.在那之前,我会继续努力让这个工作,并想知道为什么,对于这样一个流行的平台,SharePoint 比一个有头皮屑的少年更古怪.

If anyone has had previous experience of this happening to them, and can give me some tips, then that would be great. Until then, I'll keep trying to get this working, and wondering why, for such a popular platform, SharePoint is more flakey then a teenager with dandruff.

干杯.杰斯.

推荐答案

好吧,您不需要将文件配置到 _Layouts 文件夹.您所要做的就是复制.根据您的问题,您正在使用 wsp 构建器.您可以删除 <ElementManifest Location="module.xml"/> 和文件.

Well you dont need to provision the files to _Layouts folder. All you have have to do is just copy. as per your question you are using the wsp builder. You can remove the <ElementManifest Location="module.xml" /> and the Files.

只需将文件放入 12\TEMPLATE\LAYOUTS 文件夹并运行 wspbuilder.文件将进入 _layouts.供应仅适用于需要进入站点的文件._布局文件是应用程序页面,这是实现此目的的最佳方法.

Just place the files in to the 12\TEMPLATE\LAYOUTS folder and run the wspbuilder. Files will go in to _layouts. Provisioning is only for the files that needs to go in to the Site. _Layout files are application pages and it is the best approach to do this.

这篇关于SharePoint 文件配置不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 04:49