0
我目前正在调整我的msbuild文件以进行持续集成。更具体地说,我试着调用powershell在msbuild文件中的远程服务器上执行任务,遵循Microsoft official help的指导。除了“& amp;”之外,一切都很棒在msbuild文件中不会被替换为“&”。例如,&在XML中不被替换为&
<Exec Command="powershell.exe -NonInteractive -executionpolicy Unrestricted
-command "& invoke-command
-Computername 'RemoteServer'
-scriptblock {...}
""/>
当的msbuild脚本包含上述执行,该命令被翻译为
powershell.exe -NonInteractive -executionpolicy Unrestricted
-command "& invoke-command
-Computername 'RemoteServer'
-scriptblock {...}
"
正如你可以看到, “& QUOT;”和“&”;“被成功翻译,而“& amp”不是。
任何线索都非常感谢!