部署Sharepoint 2010 WebPart,但它在哪里?

时间:2011-10-27 09:10:52

标签: sharepoint-2010 web-parts

按照此问题的答案中的步骤进行操作:How to deploy custom webpart from one server to another in sharepoint 2010

一切似乎都运转正常,但现在我该怎么办?如果我'编辑'sharepoint站点的主页并单击“添加Web PArt”,我在列表中看不到它。

对于Sharepoint来说,我是一个完全新手,所以简单的步骤将不胜感激。

干杯。

2 个答案:

答案 0 :(得分:0)

Web部件定义文件必须位于 Web部件库中,才能在“添加Web部件列表”中使用。

您可以创建SharePoint网站功能以在此库中部署定义文件:

<强> feature.xml的:

<?xml version="1.0" encoding="utf-8" ?>
<Feature
    xmlns="http://schemas.microsoft.com/sharepoint/"
    Id="DFD20610-C329-45E0-B037-8E6FC0A684AB"
    Title="Web Part Feature"
    Scope="Site"
    >

    <ElementManifests>
        <ElementManifest Location="Elements.xml" />
        <ElementFile Location="TheWebPart.dwp" />
    </ElementManifests>
</Feature>

<强> Elements.xml的:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="WebPartPopulation" Url="_catalogs/wp" RootWebOnly="TRUE">
        <File Path="TheWebPart.dwp" Url="TheWebPart.dwp" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
            <Property Name="Group" Value="Custom" />
        </File>
    </Module>
</Elements>

答案 1 :(得分:0)

我认为Elements.xml中的Module行还需要包含 List =&#34; 113&#34;

相关问题