我试图在远程计算机上部署BizTalk,并在本地服务器上使用以下代码。
$args = "D:\TFS_Testing\9thNov\Sample_BTDF\Deployment\Deployment.btdfproj /target:Deploy /p:Configuration=Debug"
$exitCode = ( Start-Process "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" -ArgumentList $args -Wait -Passthru)
Write-Host " Exit Code: $exitCode"
Write-Host ""
if($exitCode -ne 0)
{
Write-Error " Error while calling MSBuild, Exit Code: $exitCode"
}
有效。我想让它在远程计算机上工作,但失败了。我正在尝试调用命令
$args = "D:\TFS_Testing\9thNov\Sample_BTDF\Deployment\Deployment.btdfproj /target:Deploy /p:Configuration=Debug"
Invoke-Command -ComputerName "INHYDDCGAVINI" -ScriptBlock { & "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" } -ArgumentList $args.ToString()
其错误为
MSBUILD:错误MSB1003:指定项目或解决方案文件。的 当前工作目录不包含项目或解决方案文件。
我什至按照您的建议尝试了:
$args="Configuration=Server;SkipUndeploy=true /target:Deploy /l:FileLogger,Microsoft.Build.Engine;logfile='C:\Program Files (x86)\Sample_BTDF for BizTalk 1.0.0\1.0\DeployResults\DeployResults.txt' 'D:\TFS_Testing\9thNov\Sample_BTDF\Deployment.btdfproj' /p:ENV_SETTINGS='D:\TFS_Testing\9thNov\Sample_BTDF\Deployment\EnvironmentSettings\Exported_ProdSettings.xml'"
Invoke-Command -ComputerName "INHYDDCGAVINI" -ScriptBlock { & "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" } -ArgumentList $args.ToString()
有人帮忙,哪里出了问题。