智慧 + 毅力 = 无所不能

正确性、健壮性、可靠性、效率、易用性、可读性、可复用性、兼容性、可移植性...

导航

Framework配置错误

Posted on 2015-08-10 13:28  Bill Yuan  阅读(362)  评论(0编辑  收藏  举报

转自:http://blog.csdn.net/ked/article/details/25052955

VS2012命令提示符无法使用的解决方法

打开VS2012命令提示符时报错“ERROR: Cannot determine the location of the VS Common Tools folder.”

 

解决方法:

1.打开计算机->属性->高级系统设置

2.新建变量VS110COMNTOOLS,属性值设置为C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\

3.打开编译VC\bin目录下的vcvars32.bat文件,在第一行添加下列语句:

   @echo Setting environment for using Microsoft Visual Studio 2012 x64 tools
   @SET VSINSTALLDIR=c:\Program Files\Microsoft Visual Studio 11.0
   @SET VCINSTALLDIR=c:\Program Files\Microsoft Visual Studio 11.0\VC 
   @SET FrameworkDir32=c:\Windows\Microsoft.NET\Framework
   @SET FrameworkVersion32=v4.0.30319
   @SET Framework35Version=v3.5

  并注释掉下列语句:

   ::@call :GetVSCommonToolsDir
   ::@if "%VS110COMNTOOLS%"=="" goto error_no_VS110COMNTOOLSDIR

   ::@call "%VS110COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit