How can I get TFS2010 to run MSDEPLOY for me through MSBUILD?

后端 未结 8 1722
北海茫月
北海茫月 2020-11-28 17:47

There is an excellent PDC talk available here from Vishal Joshi which describes the new MSDEPLOY features in Visual Studio 2010 - as well as how to deploy an application wit

8条回答
  •  悲&欢浪女
    2020-11-28 18:09

    Here's the steps that finally worked for me. I wanted to get the working with RemoteAgent, but couldn't get that working no matter what I tried.

    You don't have to do exactly like this, but this is how I got it working

    • Configure WMSVC
    • Make sure the service is started
    • Configure an IIS user (click on the TOP MOST SERVERNAME in IIS) and go to 'IIS Manager Users'. I suggest making it different to your windows name.
    • Make sure the user account for WMSVC (LOCAL SERVICE for me) has write permissions to the IIS directory you're using
    • In my case I'm using an SSL certificate (even though it is hitting localhost).

    Remember these are all arguments to MSBUILD added within the TFS Build definition

    /p:DeployOnBuild=True 
    /p:DeployTarget=MSDeployPublish 
    /p:MSDeployPublishMethod=WMSVC 
    /p:MsDeployServiceUrl=https://staging.example.com:8172/msdeploy.axd 
    /p:username=sweaveriis 
    /p:password=abcd1234 
    /p:DeployIisAppPath=staging.example.com/virtual_directory_name
    /p:AllowUntrustedCertificate=True
    

    Note: staging.example.com is actually the local box with a hosts file entry pointing to 127.0.0.1. Localhost would probably work here too.

    Useful articles:

    Troubleshooting MSDeploy issues

    More troubleshooting

提交回复
热议问题