已經(jīng)安裝了VS2013,但用MSbuild編譯的時候一直選擇的是V11的設(shè)置,原來是這個環(huán)境變量的設(shè)置所致。如下設(shè)置就用的是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:’ 不是內(nèi)部或外部命令,也不是可運(yùn)行的程序
或批處理文件。
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild
Microsoft? 生成引擎版本 4.7.2053.0
[Microsoft .NET Framework 版本 4.0.30319.42000]
版權(quán)所有 ? Microsoft Corporation。保留所有權(quán)利。
MSBUILD : error MSB1003: 請指定項(xiàng)目或解決方案文件。當(dāng)前工作目錄中未包含項(xiàng)目或解
決方案文件。
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild
Microsoft? 生成引擎版本 4.7.2053.0
[Microsoft .NET Framework 版本 4.0.30319.42000]
版權(quán)所有 ? Microsoft Corporation。保留所有權(quán)利。
MSBUILD : error MSB1003: 請指定項(xiàng)目或解決方案文件。當(dāng)前工作目錄中未包含項(xiàng)目或解
決方案文件。
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>文章來源:http://www.zghlxwxcb.cn/news/detail-595767.html
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:\' 不是內(nèi)部或外部命令,也不是可運(yùn)行的程序
或批處理文件。
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild
Microsoft(R) 生成引擎版本 4.7.2053.0
[Microsoft .NET Framework 版本 4.0.30319.42000]
版權(quán)所有 (C) Microsoft Corporation。保留所有權(quán)利。
MSBUILD : error MSB1003: 請指定項(xiàng)目或解決方案文件。當(dāng)前工作目錄中未包含項(xiàng)目或解
決方案文件。
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild
Microsoft(R) 生成引擎版本 4.7.2053.0
[Microsoft .NET Framework 版本 4.0.30319.42000]
版權(quán)所有 (C) Microsoft Corporation。保留所有權(quán)利。
MSBUILD : error MSB1003: 請指定項(xiàng)目或解決方案文件。當(dāng)前工作目錄中未包含項(xiàng)目或解
決方案文件。
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為文章來源地址http://www.zghlxwxcb.cn/news/detail-595767.html
Msbuild=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
到了這里,關(guān)于Msbuild的工具集版本的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!