Cannot determine the location of the VS Common Tools folder.

用 DEVENV 在命令行编译 .sln 工程时,出现以下错误:

--------------------------------------------------------------------------------

Setting environment for using Microsoft Visual Studio 2010 x86 tools.
EXEC : error : Cannot determine the location of the VS Common Tools folder.

--------------------------------------------------------------------------------

可能原因是 环境变量设置的不完整,

set PATH=%VS100COMNTOOLS%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64;

SET FrameworkDir=%windir%\Microsoft.NET\Framework
SET FrameworkVersion=v4.0.30319

如上设置之后,编译还是不通过。

将 %SystemRoot%\system32 加入PATH 环境变量后,编译通过。

posted @ 2014-02-22 17:09  細水長流  阅读(4058)  评论(0编辑  收藏  举报