Suppose I need to build a whole solution (which has multiple projects) in command line, is it possible to run a clean build for a particular projects and run an incremental
Use msbuild and pass the Clean and Rebuild targets:
msbuild path\to\solution\yoursolution.sln /t:Clean;Rebuild
Or if you only want to rebuild a single project:
msbuild path\to\project\yourproject.csproj /t:Clean;Rebuild
msbuild is available in the Windows SDK or the Visual Studio Command prompt.