Msbuild的工具集版本

已经安装了VS2013,但用MSbuild编译的时候一直选择的是V11的设置,原来是这个环境变量的设置所致。如下设置就用的是V12(VS2013)的编译器。

Set VCTargetsPath = C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120

Setting environment for using Microsoft Visual Studio 2010 x64 tools.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>C:>dir /s /b /d MSBuild
.exe
‘C:’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild
Microsoft® 生成引擎版本 4.7.2053.0
[Microsoft .NET Framework 版本 4.0.30319.42000]
版权所有 © Microsoft Corporation。保留所有权利。

MSBUILD : error MSB1003: 请指定项目或解决方案文件。当前工作目录中未包含项目或解
决方案文件。

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild
Microsoft® 生成引擎版本 4.7.2053.0
[Microsoft .NET Framework 版本 4.0.30319.42000]
版权所有 © Microsoft Corporation。保留所有权利。

MSBUILD : error MSB1003: 请指定项目或解决方案文件。当前工作目录中未包含项目或解
决方案文件。

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>

Setting environment for using Microsoft Visual Studio 2010 x64 tools.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>C:\>dir /s /b /d  MSBuild
.exe
'C:\' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild
Microsoft(R) 生成引擎版本 4.7.2053.0
[Microsoft .NET Framework 版本 4.0.30319.42000]
版权所有 (C) Microsoft Corporation。保留所有权利。

MSBUILD : error MSB1003: 请指定项目或解决方案文件。当前工作目录中未包含项目或解
决方案文件。

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild
Microsoft(R) 生成引擎版本 4.7.2053.0
[Microsoft .NET Framework 版本 4.0.30319.42000]
版权所有 (C) Microsoft Corporation。保留所有权利。

MSBUILD : error MSB1003: 请指定项目或解决方案文件。当前工作目录中未包含项目或解
决方案文件。

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>
@echo off
set Msbuild=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
set ObjCurrent=D:\01multiVersionARXDBGplus\multiVersionArxDbg.verproj
set arxpath =D:\01multiVersionARXDBGplus\ARXDBG2008\Release\ArxComLib\Win32\ArxComLib.arx
set Arrpath32=D:\work\hui zuhao\Dwg\CommonLib.Arx
Set Arrpath64=D:\work\huizuhao\Dwg\CommonLib\Ary05mLib\ArxComLib\x64\ArxConLib.arx
setlocal enabledelayedexpansion
for /l %%i in (0,1,0) do (
echo !ObjCurrent%%i!
del %ArxPath32%
	%Msbuild% !ObjCurrent%%i! /t:build /p:Configuration-Release /p:Platform=Win32 /p:PlatformToolset=v80 /p:PrecompiledHeader=NotUsing /n
if not exist %ArxPath32%
	(%Msbuild% !ObjCurrent%%i! /t:build /p:Configuration=Release /p:Platform=Win32 /p:PlatformToolset=v80 /p:PrecompiledHeader=NotUsing /n
if not exist %ArxPath32%
	(%Msbuild% !ObjCurrent%%i! /t:clean
	%Msbuild% !%ObjCurrent%%i% /t:rebuild/ p:Configuration=Release /p:Platform=Win32 /p:PlatformToolset=v80 /p:PrecompiledHeader=NotUsing /n)
if not exlst %ArxPath32%
(echo v80
Pause)
)
del %ArxPath32%

%Msbuild% !ObjCurrent%%i!/t:build /p:Configuration-Release /p:Platform=Win32 /p:PlatformToolset=v90 /p:PrecompiledHeader=NotUsing /n
if not exist %ArxPath32%
	(%Msbuild% !ObjCurrent%%i! /t:build /p:Configuration=Release /p:Platform=Win32 /p:PlatformToolset=v90 /p:PrecompiledHeader=NotUsing /n
if not exist %ArxPath32%
	(%Msbuild% !ObjCurrent%%i! /t:clean
	%Msbuild% !%ObjCurrent%%i% /t:rebuild/ p:Configuration=Release /p:Platform=Win32 /p:PlatformToolset=v90 /p:PrecompiledHeader=NotUsing /n)
if not exlst %ArxPath32%
(echo v90
Pause)
)

del %ArxPath64%
%Msbuild% !ObjCurrent%%i!/t:build /p:Configuration-Release /p:Platform=x64 /p:PlatformToolset=v90 /p:PrecompiledHeader=NotUsing /n
if not exist %ArxPath32%
	(%Msbuild% !ObjCurrent%%i! /t:build /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v90 /p:PrecompiledHeader=NotUsing /n
if not exist %ArxPath32%
	(%Msbuild% !ObjCurrent%%i! /t:clean
	%Msbuild% !%ObjCurrent%%i% /t:rebuild/ p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v90 /p:PrecompiledHeader=NotUsing /n)
if not exlst %ArxPath32%
(echo v90
Pause)
)
)

注意,vs2010的msbuild为

Msbuild=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lst0426

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值