A Visual Studio project can be upgraded from the command line using the devenv.exe command as follows:
devenv.exe
devenv.exe SOLUTION_PATH /Upgrade