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」不是。
任何線索都非常感謝!