Error Starting Developer Command Prompt for VS 2019
Fresh install of 2019. Went to run any of the command prompt links...got 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
:remove_quotes
set %1=%~2
goto :EOF
:do_test
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