TFS 2010 Passing parameters to msdeploy in a build definition

Domanda TFS 2010 Passing parameters to msdeploy in a build definition

  • mardi 29 novembre 2011 14:07
     
     

    Hi, it seems that arguments for MSBuild inside a build definition are not very well documented, Is there somewhere blog, wiki, MS web site.....

    I have a build definiton where it works fine on the localhost. However, when I change some of the arguments to deploy to a remote server (all necessary config has been done for Management services and delegation.....)

    MSBuild arguments are as follows :

    /p:DeployOnBuild=True /p:Configuration=Debug /p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=True /p:CreatePackageOnPublish=True /p:DeployIisAppPath="dev.tfsdev.net" /p:MsDeployServiceUrl=WIN-GS9GMUJITS8 /p:UserName=WIN-GS9GMUJITS8\Administrator /p:Password=Passwrd /p:AllowUntrustedCertificate=True

     

    Runing the build gives nothing, no content deployed to the remote IIS, in the build log inside VS, see nothing.

     

    Is there any other parameter to add or some of my arguments are not correct ?

    Thanks

Toutes les réponses

  • mardi 29 novembre 2011 15:06
     
     

    I have a build definition where I populated the MSbuild arguments to do deployment (publishing my web site). The build and deployment on local succeed, contents are deployed correctly but in VS, when I click on mybuild > view log , I see several sections (update Build number, Run on agent, Compile and test.......) but nothing regarding the deployment process in this log.

    Is it a parameter to add somewhere?

    Why I am asking this is because I am trying in a 2nd step to deploy to a remote IIS instead of local but it is not working. No errors are generated during the build in spite of the fact that it is not poublishing to the remote IIS

  • mardi 29 novembre 2011 18:02
     
     

    I googled a little bit and tried the following arguments :

    /p:DeployOnBuild=True /p:Configuration=Debug /p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=WMSVC

    /p:CreatePackageOnPublish=True /p:DeployIisAppPath="dev.tfsdev.net"

    /p:MsDeployServiceUrl=WIN-GS9GMUJITS8:80/msdeploy /p:UserName=WIN-GS9GMUJITS8\Administrator /p:Password=Passwrd /p:AllowUntrustedCertificate=True

    I started getting the following error in the build log :

    C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3847):
    Web deployment task failed.(Could not complete the request to remote agent URL 'https://win-gs9gmujits8:80/msdeploy:8172/msdeploy.axd?site=dev.tfsdev.net'.) 
    Could not complete the request to remote agent URL 'https://win-gs9gmujits8:80/msdeploy:8172/msdeploy.axd?site=dev.tfsdev.net'.
    The underlying connection was closed: An unexpected error occurred on a send. The handshake failed due to an unexpected packet format.

  • mercredi 30 novembre 2011 05:14
    Modérateur
     
     

    HI Eliassal,

     

    You can turn on the MSBuild using its verbosity switch (/verbosity:level), you can use detailed or diagnostic level to show more detailed information for your build/publish task.

     

    Based on above error message above, the handshake failed due to an unexpected packet format, I suggest you double check your remote IIS’s settings to confirm if it is correct to accept your data, e.g. SSL.

     

    If we publish this Web project using Visual Studio IDE, does it work on your side?

     

    Since MSbuild just accept different attribute for publishing the web application, we are not write our own MSbuild logical script, this issue is high related on ASP.net deployment setting. I suggest you raise this issue to our ASP.net forum, there are more experts who are familiar with ASP.net. http://forums.asp.net/26.aspx/1?Configuration+and+Deployment

     

    Regards,

    Yi

     

     

     

      


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
  • lundi 5 décembre 2011 03:12
    Modérateur
     
     

    Hello,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions? 

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
  • vendredi 9 décembre 2011 08:51
     
     

     I managed by the end of the day to deploy, it was the "MsDeploy.axd " that I was not using which is not documented anywhere. I was able to extract this from different blogs

    My initial question is and still now, is there any other parameters that we can use? where is the documentation from MS around those parameters and values.....

  • lundi 12 décembre 2011 03:31
    Modérateur
     
     

    Hi eliassal,

    For the parameters of MSBuild command line, this link shows the list of Overrideable Command Line Properties, http://msdn.microsoft.com/en-us/library/bb546103(VS.90).aspx.

    Moreover, we can override any properties in your build script. Therefore, the parameters depend on which task you are executing.

    The general MSBuild task reference can be found at http://msdn.microsoft.com/en-us/library/7z253716.aspx.

    Some tasks are project specified task or customer task, you may search the task from MSDN for confirming which type of properties we can override.

    For MSDeploy, it is a way to deploy ASP.net web application, I suggest you take a look http://msdn.microsoft.com/en-us/library/dd483479.aspx walkthroughs (1-4), it may help. Also, ASP.net forum is suggested: http://forums.asp.net/26.aspx/1?Configuration+and+Deployment

    I find a blog which is talk about the parameters for MSDeploy, http://blog.shawnewallace.com/2011/01/automated-deployement-with-tfs-2010.html

    Hope it helps.

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
  • mercredi 22 février 2012 08:48
     
     

    It seams that I have the exact same issue. I don't see anything, it just don't work. Publishing with OneClick deployment with VS2010 works great, so I don't understand what the problem is.

    Did you find a solution to this?

    Thanks


    Cheers, Christian Fredh http://www.christianfredh.com/blog/

  • mardi 3 avril 2012 22:34
     
     

    Hi there,

    I was reading your article and thinking I have the same issues as well.

     

    I am using VS studio 2010 and TFS 2010. My MSbuild is working fine and currently, I deploy the code manually. I would like to automate my deployment but not sucessfull so far.

    My goal is to be able to click a button in my completed build and it will deploy to my web server. I download the latest Microsoft Web Deploy 2.0. Installed in my build server and my web server environment. Both of my Web deployment agent services are running in the build server and the web server.

     

    Here is the setting in my build definition

    /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=WMSVC /p:MSDeployServiceUrl=https://xxx.xxx.xxx.xxx:8172/MsDeploy.axd /p:DeployIisAppPath="wwwqa/deploy" /p:UserName=domain\userid /p:Password=password /p:AllowUntrustedCertificate=True

     

    When I queue new build it's completed sucessfully but no code were deployed. I did not see any arrors inn the build log.

     

    Please advise.

     

    Thanks,