To build Microsoft Visual Studio projects from command line use devenv utility. First of all you should execute vsvars32.bat file to set the appropriate environment variables. Search it in C:\Program Files\Microsoft Visual Studio 8\Common7\Tools. This set will be only for current command window.
Here is an example of using the devenv utility:
C:\Documents and Settings\n0xi0uzz\Desktop\src>devenv graphs.sln /build
Microsoft (R) Visual Studio Version 8.0.50727.42. Copyright (C) Microsoft Corp 1984-2005. All rights reserved. ——— Build started: Project: graphs, Configuration: Debug Win32 ——— Compiling... stdafx.cpp Compiling... GRAPH.cpp
graphs.cpp graphsDoc.cpp graphsView.cpp MainFrm.cpp Generating Code... Compiling resources... Compiling manifest to resources... Linking... Embedding manifest... Build log was saved at "file://c:\Documents and Settings\n0xi0uzz\Desktop\src\Debug\BuildLog.htm" graphs - 0 error(s), 0 warning(s) ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========