Error Starting Developer Command Prompt for VS 2019

Duncan James 1 Reputation point

Fresh install of 2019. Went to run any of the command prompt the error..

"Files was not expected at this time".

This was due to a quoted string in the environment variable VS160COMNTOOLS.

There is an IF statement in the file vsdevcmd_start.bat that has the line

if "%VS160COMNTOOLS%" NEQ "" (

And this breaks with the quotes. I added this code to "delete the quotes" for the sake of this comparison ( and beyond )

goto do_test


set %1=%~2

goto :EOF

call :remove_quotes VS160COMNTOOLS %VS160COMNTOOLS%


With that added, all of my "developer prompts" loaded again.

.. Please note, that batch file should be one statement per line, but I can't seem to format it here.
.. Also, you'll have to save it as admin, as the file vsdevcmd_start.bat lives in a "highly protected" area :D

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,440 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
34,851 questions
{count} votes