0
是否可以从Perl执行Msbuild命令?使用Perl调用在Msbuild中编写的构建脚本
在我用来检索所有Visual Studio 2010环境变量的powershell中,然后直接调用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中存档?