Skip to content

Build, Rebuild and Clean in Visual Studio

7 Nov, 11

In visual Studio we have three options Build, Rebuild and clean at project level as well as at solution level. In this blog post we will understand when to use what and why.

What they does:

At Project level:

  • Build saves and compiles only those source files which are changed from last build it.
  • Rebuild saves and compiles all files come under that project. It does not matter whether file is modified from last build or not.
  • Clean deletes all compiler generated files from bin/release folder. While you build/rebuild after clean new files are created.

At Solution level:

  • If solution is having single project, all three options work in same fashion as described for project level.
  • If solution is having multiple projects:
Build saves and compiles only those source files which are changed from last build under the startup project.
Rebuild saves, clean and build all project and their files.
Clean deletes all compiler generated files from bin/release folder. While you build/rebuild after clean new files are created.

When to choose what:

If your solution is big then choosing Build can save much time instead of rebuild.

Update:

In Visual Studio 2012 we do not “Clean” option at project level.

From → General

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: