部署features提示无法添加到范围解决思路
部署features提示无法添加到范围
在moss2007中部署一个features,提示
功能"87E043B4-7833-4b4f-8D28-9A9C15E308BA"未安装在此服务器场中,无法添加到该范围
feature.xml:
<Feature
Id="87E043B4-7833-4b4f-8D28-9A9C15E308BA"
Title="利用Feature增加的Site级别的菜单"
Description="利用Feature增加的Site级别的菜单"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="elements.xml" />
</ElementManifests>
</Feature>
elements.xml
<Elements xmlns="http://schmas.microsoft.com/sharepoint/">
<CustomAction
Id="mypage"
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="2000"
Title="我的日常工作"
Description="My Schedule">
<UrlAction Url="~site/Pages/Request.aspx" />
</CustomAction>
</Elements>
deployfeature.bat:
echo Copying the feature...
echo.
rd /s /q "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\custaction"
mkdir "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\custaction"
copy /Y feature.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\custaction"
copy /Y elements.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\custaction"
echo.
echo Activating the feature...
echo.
pushd %programfiles%\common files\Microsoft Shared\web server extensions\12\bin
stsadm -o installfeature -filename custaction\feature.xml -force
stsadm -o activatefeature -filename custaction\feature.xml -url http://lws02:9000
------解决方案--------------------
Scope="Site"
改成
Scope="Farm"
------解决方案--------------------
可能是你的Feature的物理文件拷贝有问题,没有成功拷贝到Features文件夹下,你试试手动拷贝过去然后再使用你的安装和激活命令
stsadm -o installfeature -filename custaction\feature.xml -force
stsadm -o activatefeature -filename custaction\feature.xml -url http://lws02:9000
在moss2007中部署一个features,提示
功能"87E043B4-7833-4b4f-8D28-9A9C15E308BA"未安装在此服务器场中,无法添加到该范围
feature.xml:
<Feature
Id="87E043B4-7833-4b4f-8D28-9A9C15E308BA"
Title="利用Feature增加的Site级别的菜单"
Description="利用Feature增加的Site级别的菜单"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="elements.xml" />
</ElementManifests>
</Feature>
elements.xml
<Elements xmlns="http://schmas.microsoft.com/sharepoint/">
<CustomAction
Id="mypage"
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="2000"
Title="我的日常工作"
Description="My Schedule">
<UrlAction Url="~site/Pages/Request.aspx" />
</CustomAction>
</Elements>
deployfeature.bat:
echo Copying the feature...
echo.
rd /s /q "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\custaction"
mkdir "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\custaction"
copy /Y feature.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\custaction"
copy /Y elements.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\custaction"
echo.
echo Activating the feature...
echo.
pushd %programfiles%\common files\Microsoft Shared\web server extensions\12\bin
stsadm -o installfeature -filename custaction\feature.xml -force
stsadm -o activatefeature -filename custaction\feature.xml -url http://lws02:9000
------解决方案--------------------
Scope="Site"
改成
Scope="Farm"
------解决方案--------------------
可能是你的Feature的物理文件拷贝有问题,没有成功拷贝到Features文件夹下,你试试手动拷贝过去然后再使用你的安装和激活命令
stsadm -o installfeature -filename custaction\feature.xml -force
stsadm -o activatefeature -filename custaction\feature.xml -url http://lws02:9000