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.0Common7IDE;C:Program Files (x86)Microsoft Visual Studio 10.0VCin;C:Program Files (x86)Microsoft SDKsWindowsv7.0ABinx64;

SET FrameworkDir=%windir%Microsoft.NETFramework
SET FrameworkVersion=v4.0.30319

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

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

原文地址:https://www.cnblogs.com/cindy-hu-23/p/3561031.html