MSDeploy batch file does not handle quotes anymore

前端 未结 2 1340
北海茫月
北海茫月 2020-12-30 03:17

As part of our build process we deploy our web applications using MSDeploy. This worked perfect until a few weeks ago (I think when we updated our build/TFS server to SP1 of

相关标签:
2条回答
  • 2020-12-30 04:02

    I was able to work around this issue by surrounding the whole argument in quotes and the inner argument in single quotes, ie:

    .\Deploy.cmd /y 
      /m:https://SERVER:8172/msdeploy.axd 
      -allowUntrusted 
      "-postSync:runCommand='echo hello'"
    
    0 讨论(0)
  • 2020-12-30 04:10

    This is a bug introduced in the SP1 release. You can work around it by editing %ProgramFiles(x86)%\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (note 64-bit path). Change lines 3238-3258 to match the respective contents in the old deploy.cmd file; the diff should only be like 3 lines, removing _ArgCurrentOriginal and using _ArgCurrent.

    There's also a KB recently published on the issue: http://support.microsoft.com/kb/2537134. This includes an updated .targets file so you don't have to make the edit yourself.

    0 讨论(0)
提交回复
热议问题