MSDeploy doesn't deploy to remote server using MSBuild and Visual Studio 2010

假装没事ソ 提交于 2019-12-02 22:40:34
Chad Peck

After many rounds of changing the parameters, I was able to find a solution and get the build to deploy successfully. The parameters that I ended up using were:

/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish 
/p:MSDeployPublishMethod=**RemoteAgent** 
/p:MsDeployServiceUrl=http://my-server-name
/p:username=myusername 
/p:password=mypassword

It appears that when using InProc for the MSDeployPublishMethod MSBuild ignores MsDeployServiceUrl and always tries to deploy to the local server. I changed it to RemoteAgent and it deployed successfully. I did notice that the Package file is nolonger contained in the MyWebApplication_Package folder, but that isn't a big deal to me.

Considering vs2010 is RTM'd, you might consider just upgrading and see if the problem goes away.

Sayed Ibrahim Hashimi

For the build that Team Build is running what file did you specify? If it was a solution file then just passing those properties into it doesn't mean that they are then propagated to each project file when built. When you build solution files, only a limited set of properties are passed to the projects being built. If this is the case you should create a .proj file which will essentially replace your solution file and pass in these properties.

I recently blogged about how to Replace your solution file with an MSBuild file.

Let me know if this doesn't apply to you or doesn't help you.

FYI you might also be interested in this other thread on MSDeploy, but its not the same problem your having here. How can I get TFS2010 to run MSDEPLOY for me through MSBUILD?.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!