开发者

Elements of type 'Module' are not supported at the 'Farm' scope. This feature could not be installed

I am packaging my Project into .wsp using the WSPBuilder Extension ->Build WSP. Once I run the `stsadm -o addsoltion -filename myWsp.wsp and go to deploy the soltion I get this:

Elements of type 'Module' are not supported at the 'Farm' scope. This feature could not be installed.

Now I have a whole bunch of features that I have inhereted from previos developers and those features somehow had been deployed but I don't know how. Can someone help me to actually fix the error and deploy what I need?

Some of them look like this (the manifest.xml):

  <?xml version="1.0" encoding="utf-8"?>

<ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D400BE0CE07B5D2F45ef8EF5235741C789B9" Name="Test Portal Web Part Page"
             Description="Web Part Page for Test Portal."
             Version="1"
             Group="MyCompany Test Portal">
</ContentType>

<!-- Master Page Catalogs -->
<Module Name="PageLayoutsModule" Url="_catalogs/masterpage" RootWebOnly="True" Path="pagelayouts">
    <File Url="main.master" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary"/>
    <File Url="BeaconLayout.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Test Portal Web Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D400BE0CE07B5D2F45ef8EF5235741C789B9;#"></Property>
    </File>
    <File Url="BeaconLayout2.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Test Portal Web Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D400BE0CE07B5D2F45ef8EF5235741C789B9;#"></Property>
    </File>
    <File Url="OneColumnLayout.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Test Portal Web Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D400BE0CE07B5D2F45ef8EF5235741C789B9;#"></Property>
    </File>
    <File Url="TwoColumnLayout.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Test Portal Web Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D400BE0CE07B5D2F45ef8EF5235741C789B9;#"></Property>
    </File>
    <File Url="ThreeColumnLayout.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Test Portal Web Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D400BE0CE07B5D2F45ef8EF5235741C789B9;#"></Property>
    </File>
    <File Url="PrintLayout.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Test Portal Web Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D400BE0CE07B5D2F45ef8EF5235741C789B9;#"></Property>
    </File>
    <File Url="MyCompanyArticleLinks.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#"></Property>
    </File>
    <File Url="MyCompanyArticle.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#"></Property>
    </File>
    <File Url="MyCompanyArticleRightImage.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#"></Property>
    </File>
    <File Url="MyCompanyWelcomePage.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#"></Property>
    </File>
    <File Url="MyCompanyWelcomePage2.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#"></Property>
    </File>
    <File Url="MyCompanyArticleRightWebParts.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;"></Property>
        <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/ArticleLinks.png"></Property>
        <Property Name="PublishingAssociatedContentType"
                  Value=";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#"></Property>
    </File>
</Module>
<!-- Site Pages -->
<Module Name="PagesModule" Url="Pages" RootWebOnly="True" Path="Pages">
    <File Url="ResetForgottenPassword.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <AllUsersWebPart WebPartZoneID="Header" WebPartOrder="0">
            <![CDATA[
               <?xml version="1.0" encoding="utf-8" ?>
                    <webParts>
                        <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                            <metaData>
                                <type name="MyCompany.TestPortal.Moss.WebParts.ResetDomainPasswordWebPart, MyCompany.TestPortal.Moss, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4e32e6f1096bb318"/>
                                <importErrorMessage>Cannot import the Forgotten Password Reset Web Part.</importErrorMessage>
                            </metaData>
                            <data>
                                <properties>
                                    <property name="Title" type="string">MyCompany Test Portal Forgotten Password Reset Web Part</property>
                                    <property name="Description" type="string">MyCompany Test Portal Forgotten Password Reset Web Part</property>
                                    <property name="Group" type="string">MyCompany</property>
                                </properties>
                            </data>
                        </webPart>
                    </webParts>
            ]]>
        </AllUsersWebPart>
    </File>
    <File Url="SecretQAManage.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <AllUsersWebPart WebPartZoneID="Header" WebPartOrder="0">
            <![CDATA[
                <?xml version="开发者_如何学Go1.0" encoding="utf-8" ?>
                <webParts>
                    <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                        <metaData>
                            <type name="MyCompany.TestPortal.Moss.WebParts.SecretQAManageWebPart, MyCompany.TestPortal.Moss, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4e32e6f1096bb318" />
                            <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
                        </metaData>
                        <data>
                            <properties>
                                <property name="Title" type="string">MyCompany Test Portal Secret Questions &amp; Answers Management Web Part</property>
                                <property name="Description" type="string">MyCompany Test Portal Secret Questions &amp; Answers Management Web Part</property>
                                <property name="Group" type="string">MyCompany</property>
                            </properties>
                        </data>
                    </webPart>
                </webParts>
            ]]>
        </AllUsersWebPart>
    </File>
    <File Url="UserManagement.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <AllUsersWebPart WebPartZoneID="MainWebPartZone" WebPartOrder="0">
            <![CDATA[
            <?xml version="1.0" encoding="utf-8" ?>
            <webParts>
                <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                    <metaData>
                        <type name="MyCompany.TestPortal.Moss.WebParts.SsoUserCredentialsWebPart, MyCompany.TestPortal.Moss, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4e32e6f1096bb318" />
                        <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
                    </metaData>
                    <data>
                        <properties>
                            <property name="ChromeType" type="chrometype">None</property>
                            <property name="Title" type="string"> SSO User Credentials Web Part</property>
                            <property name="Description" type="string">MyCompany Test Portal SSO User Credentials Web Part</property>
                            <property name="Group" type="string">MyCompany</property>
                        </properties>
                    </data>
                </webPart>
            </webParts>
            ]]>
        </AllUsersWebPart>
    </File>
    <File Url="ChangePassword.aspx" IgnoreIfAlreadyExists="true" Type="GhostableInLibrary">
        <AllUsersWebPart WebPartZoneID="MainWebPartZone" WebPartOrder="0">
            <![CDATA[
            <?xml version="1.0" encoding="utf-8"?>
                <webParts>
                <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                    <metaData>
                        <type name="MyCompany.TestPortal.Moss.WebParts.ChangePasswordWebPart, MyCompany.TestPortal.Moss, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4e32e6f1096bb318" />
                        <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
                    </metaData>
                    <data>
                        <properties>
                            <property name="ChromeType" type="chrometype">None</property>
                            <property name="Title" type="string"> Change  Password Web Part</property>
                            <property name="Description" type="string">MyCompany Test Portal Change  Password Web Part</property>
                            <property name="Group" type="string">MyCompany</property>
                        </properties>
                    </data>
                </webPart>
                </webParts>
            ]]>
        </AllUsersWebPart>
        <AllUsersWebPart WebPartZoneID="MainWebPartZone" WebPartOrder="0">
            <![CDATA[
            <?xml version="1.0" encoding="utf-8"?>
                <webParts>
                <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                    <metaData>
                        <type name="MyCompany.TestPortal.Moss.WebParts.ChangeNetworkPasswordWebPart, MyCompany.TestPortal.Moss, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4e32e6f1096bb318" />
                        <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
                    </metaData>
                    <data>
                        <properties>
                            <property name="ChromeType" type="chrometype">None</property>
                            <property name="Title" type="string"> Change Network Password Web Part</property>
                            <property name="Description" type="string">MyCompany Test Portal Change Network Password Web Part</property>
                            <property name="Group" type="string">MyCompany</property>
                        </properties>
                    </data>
                </webPart>
                </webParts>
            ]]>
        </AllUsersWebPart>
    </File>
</Module>

-->


You have probably already sorted this problem out.

If not, the problem seems to be with your scope, which is defined in the Feature.xml file (not Elements.xml). I.e. change it from Farm to Site:

<Feature ... Scope="Site" ...>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜