错误:VS部署解决方案时,出现ID已存在的问题。

 

[问题]

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

"已在此服务器场中安装 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 files\microsoft shared\web server extensions\12\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

posted @ 2009-04-02 15:33  LeimOO  阅读(654)  评论(0编辑  收藏  举报