sharepoint 2013 部署解决方案 此功能已在此服务器场中安装 ID 为 guid 的功能。请使用强制属性显式地重新安装

来源:互联网 发布:照片冲印软件 编辑:程序博客网 时间:2024/05/17 22:40

之前部署了某解决方案,重新安装的话,没问题,但部署时就会报类似如下的错误:

"此功能已在此服务器场中安装 ID为 2cf57215-0997-47ff-a9fa-3c7bd3716699 的功能。请使用强制属性显式地重新安装。"

在VS里用DebugDeploy生成的时候,仔细看一下“输出”发现:

Stsadm –o deploysolution…的时候,后面没有–force

[解决方法]

1、首先为了避免功能覆盖,最好用VS的“GUID生成器”重新生成一个SolutionID,用这个新的SolutionID替换两个xml文件里SolutionID;

2、新建一个Install.bat文件,来自己安装解决方案。

Install.bat文件内容如下:

@SET STSADM="c:\program files\common filesam Files\Common Files\microsoft shared\Web Server Extensions\15\BIN\stsadm"

 

Echo Adding Solutions..

%STSADM% -o addsolution -filename UserManage.wsp

 

Echo Deploying Solutions..

%STSADM% -o deploysolution -name UserManage.wsp -immediate –allowgacdeployment-force

 

%STSADM% -o execadmsvcjobs

 

Pause

 

转载地址:http://www.cnblogs.com/LeimOO/archive/2009/04/02/1428208.html

 

0 0