Build, Rebuild and Clean in Visual Studio
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.
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.
Advertisements
Leave a Comment