You should also use the correct command line prompt for building especially if you start with the one provided by Visual Studio.