前往小程序,Get更优阅读体验!
立即前往
发布
社区首页 >专栏 >Msbuild的工具集版本

Msbuild的工具集版本

作者头像
用户3519280
发布2023-07-08 11:20:59
发布2023-07-08 11:20:59
42200
代码可运行
举报
文章被收录于专栏:c++ 学习分享c++ 学习分享
运行总次数:0
代码可运行

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

代码语言:javascript
代码运行次数:0
复制
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>

代码语言:javascript
代码运行次数:0
复制
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>
代码语言:javascript
代码运行次数:0
复制
@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为

代码语言:javascript
代码运行次数:0
复制
Msbuild=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2023-05-04,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档