是否可以从 perl 执行 Msbuild 命令?
在 powershell 中,我使用检索所有 Visual Studio 2010 环境变量,然后直接调用 Msbuild 命令。
function SetVS2010()
{
$vs100comntools = (Get-ChildItem env:VS100COMNTOOLS).Value
$batchFile = [System.IO.Path]::Combine($vs100comntools, "vsvars32.bat")
Get-Batchfile $BatchFile
[System.Console]::Title = "Visual Studio 2010 Windows PowerShell"
}
function Get-Batchfile($file)
{
$cmd = "`"$file`" & set"
cmd /c $cmd | Foreach-Object {
$p, $v = $_.split('=')
Set-Item -path env:$p -value $v
}
}
SetVS2010
Function Update-VersionInfo {
&"$MsbuildBinPath\Msbuild.exe" $MSBuildFile /t:UpdateVersionInfo $Logger $AllErrLogger
}
这是一个很大的帮助。是否可以在perl中存档?