Visual Studio 2017 Could Not Create Directories, Mkdir Exit Code: 1

Visual Studio 2017 Could not create directories, mkdir exit code: 1

  1. Install this:

    sudo apt-get install openssh-server g++ gdb gdbserver

  2. Reinstall ssh-server by this: https://superuser.com/questions/1111591/how-can-i-ssh-into-bash-on-ubuntu-on-windows-10

  3. Create new user and add this user to sudo group.

Visual Studio 2015/2017 Could not create directories, mkdir exit code: 1 on Raspberry

Move project folder to common hard drive folder

The mkdir error wasn't about linux user rights or SSH setup.
Considering than this command same in Windows and Unix, it was confusing to realize that issue was on client side, not on the linux target machine. The reason is than my project folder created on OneDrive folder, so it caused this access error (I don't know why), although I run Visual Studio with admin rights.

So the solution was just to move project folder (e.g ConsoleApplication1) to common hard drive folder (Documents ets).

How can I resolve the error: The command [...] exited with code 1?

The first step is figuring out what the error actually is. In order to do this expand your MsBuild output to be diagnostic. This will reveal the actual command executed and hopefully the full error message as well

  • Tools -> Options
  • Projects and Solutions -> Build and Run
  • Change "MsBuild project build output verbosity" to "Diagnostic".

My C code isn't compiling on Visual Studio 2017 and keeps giving me an error saying it can't find the specific file?

As Lance Li-MSFT mentioned in his comment I went and saw the video https://www.youtube.com/watch?v=Slgwyta-JkA

It basically said to do this:

New project > Windows Desktop > Windows Desktop Wizard > check Empty Project > uncheck Precompiled Header and SDL(if it's there) > Application type: Console Application > righ-click Source Files > Add > C++ File(.cpp) > fileName.c > write code > to compile click Local Windows Debugger

I know it looks like a lot but it's actually really simple and easy!

PostBuildEvent Create Directory

You need to do something like:

if not exist DirToCreate mkdir DirToCreate


Related Topics



Leave a reply



Submit