Difference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?

  • Build solution will perform an incremental build: if it doesn’t think it needs to rebuild a project, it won’t. It may also use partially-built bits of the project if they haven’t changed (I don’t know how far it takes this)
  • Rebuild solution will clean and then build the solution from scratch, ignoring anything it’s done before. The difference between this and “Clean, followed by Build” is that Rebuild will clean-then-build each project, one at a time, rather than cleaning all and then building all.
  • Clean solution will remove the build artifacts from the previous build. If there are any other files in the build target directories (bin and obj) they may not be removed, but actual build artifacts are. I’ve seen behaviour for this vary – sometimes deleting fairly thoroughly and sometimes not – but I’ll give VS the benefit of the doubt for the moment 🙂

(The links are to the devenv.exe command line switches, but they do the same as the menu items.)

Leave a Comment