vsdevcmd返回找不到ext \的错误

时间:2019-01-05 15:42:28

标签: visual-studio visual-studio-2017

我正在尝试运行vsdevcmd来设置环境,但是出现错误:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\vsdevcmd\ext\"' is not recognized as an internal or external command

该目录存在,不是命令。

我以前能够运行cl.exe并编译C。然后我安装了cgygwin和cmder,我都删除了这两个,但不确定是否相关。

我使用的是C ++构建工具,而不使用的是IDE。我使用VS2017安装程序进行安装。我还进行了维修。

当我当天早些时候最初运行vsdevcmd时,它运行良好。现在运行cl会产生找不到命令的错误。

来自以下vsdevcmd的完全错误:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\vsdevcmd>"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd"
[DEBUG:vsdevcmd] Writing pre-initialization environment to C:\Users\KRAFTW~1\AppData\Local\Temp\dd_vsdevcmd15_preinit_env.log
[DEBUG:core\vsdevcmd_start] initializing with arguments ''
[DEBUG:core\parse_cmd.bat] initializaing with arguments ''
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[DEBUG:VsDevCmd.bat] calling "core\dotnet.bat"
[DEBUG:core\dotnet.bat] init:COMPLETE
[DEBUG:VsDevCmd.bat] calling "core\msbuild.bat"
[DEBUG:core\msbuild.bat] initializing...
[DEBUG:core\msbuild.bat] init:COMPLETE
[DEBUG:VsDevCmd.bat] calling "core\winsdk.bat"
[DEBUG:winsdk.bat] initializing...
[DEBUG:core\winsdk.bat] init:COMPLETE
[DEBUG:VsDevCmd.bat] calling "ext\"
'"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\vsdevcmd\ext\"' is not recognized as an internal or external command,
operable program or batch file.
[ERROR:ext\] init:FAILED code:1
[DEBUG:VsDevCmd.bat] calling "ext\netfxsdk.bat"
[DEBUG:ext\netfxsdk.bat] init:COMPLETE
[DEBUG:VsDevCmd.bat] calling "ext\roslyn.bat"
[DEBUG:ext\roslyn.bat] init:COMPLETE
[DEBUG:VsDevCmd.bat] calling "ext\testwindow.bat"
[DEBUG:ext\testwindow.bat] init:COMPLETE
[DEBUG:VsDevCmd.bat] calling "ext\vcvars.bat"
[DEBUG:ext\vcvars.bat] init:COMPLETE
[DEBUG:core\vsdevcmd_end] initializing with arguments ''
[ERROR:vsdevcmd] *** VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. ***
[ERROR:vsdevcmd] In an uninitialized command prompt, please 'set VSCMD_DEBUG=[value]' and then re-run
[ERROR:vsdevcmd] vsdevcmd.bat [args] for additional details.
[ERROR:vsdevcmd] Where [value] is:
[ERROR:vsdevcmd]    1 : basic debug logging
[ERROR:vsdevcmd]    2 : detailed debug logging
[ERROR:vsdevcmd]    3 : trace level logging. Redirection of output to a file when using this level is recommended.
[ERROR:vsdevcmd] Example: set VSCMD_DEBUG=3
[ERROR:vsdevcmd]          vsdevcmd.bat > vsdevcmd.trace.txt 2>&1
[DEBUG:VsDevCmd] Writing post-execution environment to C:\Users\KRAFTW~1\AppData\Local\Temp\dd_vsdevcmd15_env.log

0 个答案:

没有答案