我想将运行MSBuild的一些旧批处理文件转换为PowerShell脚本。研究的Invoke-MSBuild
命令,下面的代码是什么我赶上了:Powershell MSBuild错误
Invoke-MsBuild -Path "C:\path\solution.sln" -MsBuildParameters "/target:Clean;Rebuild /property:Configuration=Release;Platform=""x64"" /fl /flp:verbosity=normal;logfile=C:\path\logfile.log" -KeepBuildLogOnSuccessfulBuilds
查看日志文件,当我运行它开始建设有MSBuild的解决方案文件的脚本,但我不断收到此错误:
error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools.
我很困惑,因为我有使用12.0平台的Visual Studio 2013。我尝试重新安装v120构建工具,但没有任何改变。
您的旧批处理脚本仍然在同一台计算机上工作吗?批处理命令是什么样的? – sburgess123 2015-02-07 22:59:39
@ sburgess123是旧批处理脚本仍然有效: msbuild.exe C:\ path \ solution.sln/t:Clean;重建/ p:配置=发布;平台= x64 – 2015-02-09 19:09:25
@StewC你在哪里启动旧批处理文件来自?也就是说,你是从Visual Studio命令提示符启动它吗?运行之前你正在运行任何设置吗? – NextInLine 2015-02-12 05:04:13