我正在从Powershell执行MSBuild(MSBuild.exe) - 它部分正常工作,但它没有创建“Packages”文件夹(我需要deploy.cmd)。但是,它创建了“dev”文件夹并用几个文件填充它。是否有任何已知的原因导致无法正常工作?我的脚本很简单:
$msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe"
$options = "/p:Configuration=dev /p:DeployTarget=Package /p:DeployIisAppPath=TestProj /p:AllowUntrustedCertificate=True"
# create the build command and invoke it
# note that if you want to debug, remove the "/noconsolelogger"
# from the $options string
$clean = $msbuild + " C:\project\CMS.csproj " + $options + " /t:Clean"
$build = $msbuild + " C:\project\CMS.csproj " + $options + " /t:Build"
Invoke-Expression $clean
Invoke-Expression $build
write-host $build