开发者

msdeploy v2 doesn't work with vs2010's packages

开发者 https://www.devze.com 2023-03-18 20:24 出处:网络
I had 开发者_运维技巧v1 of msdeploy installed and I uninstalled it to install the v2. Now my vs2010 packages fail when I run the deploy.cmd because it can\'t find the registry entry - even though I\'v

I had 开发者_运维技巧v1 of msdeploy installed and I uninstalled it to install the v2. Now my vs2010 packages fail when I run the deploy.cmd because it can't find the registry entry - even though I've created an MSDeployPath environment variable pointing to the v2 path?

I have MSDeployPath set to "C:\Program Files\IIS\Microsoft Web Deploy V2" in the Advanced System Settings/Environment Variables under My Computer/Properties.

The error I get when I run the VS2010 deploy.cmd file is: Files\IIS\Microsoft was unexpected at this time.

Anyone know how to fix this? The vs2010 package's deploy.cmd looks for /1 in the registry.

So how do I change this to look for /2 if the path variable doesn't work


Edit the .cmd file to look for the correct registry path. /2 instead of /1.

My understanding is that TFS 2010 sp1 fixes this.

The line from the cmd file for pre SP1 builds looks like this:

for /F "usebackq tokens=2*" %%i  in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1" /v InstallPath`) do (

post SP1 it looks like this

for /F "usebackq tokens=1,2,*" %%h  in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy" /s  ^| findstr -i "InstallPath"`) do (


I also get the same issue when I am trying to deploy the web site using bath file under the package created by MSbuild. Only difference is I am doing it remotely.that is I assign that task to my build server and once a build is successful then it execute the command

    MVC-Client.deploy.cmd /y /M:es-websrv01

Although the set parameter xml is available it complains the it is unexpected.Normally it says for a remote web deployment we dont need admin privileges.(In my case build server is running with out admin privileges).Then I remotely logged to the build server machine and then using a command line try to to the deployment manually.But end up with the same issue.Then what I try was just copy the package in to a desktop and then did the remote deployment.It was successfully transferred the files into target IIS location.

Location where build server tries to to the deployment : C:\Program Files (x86)\Jenkins\jobs\Exile-LibrarySystem\workspace\Exile-LibrarySystem\Exile-LibrarySystem\obj\Staging\Package

I think since this folder has limits access it cant do the operation.Otherwise I should have end up with the same issue when I was trying to do the deployment in the desktop in build server machine. Is there any work around where I can get this deployment job done with in the build server location ?

Thanks

0

精彩评论

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

关注公众号