VS in Build,rebuild,clean

Source: Internet
Author: User

In general rebuild=99%* (Clean+build), the effect is very small possibility will be different, generally can be ignored.

Rebuild is a clean+build for all projects under solution. Whether the file is changed or not

Clean+build is the selected item (if solution is selected, all clean, then all build) executes clean before executing the build.

Clean is generally not required.

Build is only compiled for files that have changed. and rebuild will compile all.

It is recommended to use Clean+build or Build.
The difference between build solution---compilation solution and Build "project name" is obvious: one solution can contain multiple projects, the compilation solution is to compile all the projects in the solution, and the build "project name" simply compiles the current project
As for rebuild, there have been many times this experience: After compiling a project solution, if you have not made any changes, click the Build menu command will not compile, it is afraid that you deleted the original compiled DLL or EXE file, Vs.net will still refuse to compile because no new changes have been detected in the project, but click Rebuild, vs.net will recompile regardless of any changes made since the last compilation.

Source: http://blog.csdn.net/dongdianjing/article/details/5836652

From:http://www.codeproject.com/tips/624176/build-solution-vs-rebuild-solution-vs-clean-soluti

I am not aware of a single day in my life when I has not clicked on the Build, Rebuild, or clean menu of Visual Studio. Even though I use it in a daily basis or sometimes even on a minute to minute basis when my keyboard was high on coding, I Am still not clear about exactly each one of these menus does. I had a very vague idea, but I wanted to being sure about the exact differences between them.

When I hunted to the differences what came is surprising, below goes a detailed explanation of the same.

Build Solution Menu

This would perform an incremental build. In the other words it would only build code files which has changed. If They has not changed those files won't be touched.

Rebuild Solution Menu

This would delete all currently compiled files (i.e., EXE and DLLS) and would build everything from scratch, irrespective of If there is code change in the file or not.

Clean Solution Menu

This menu would delete all compiled files (i.e. EXE s and DLL's) from the bin/obj directory.

Now if you read the above three points I had discussed, you can conclude that:

Rebuild = clean + Build

So the next question would are if you did a Rebuild and if do clean + Build, what is the difference?

The difference is the same as the build and clean sequence happens for every project. Let's say if your solution has a projects, proj1 and Proj2. If you do a rebuild it would take proj1, clean (delete) the compiled files for proj1, and build it. After that it'll take the second project PROJ2, clean the compiled files for Proj2, and compile proj2.

But if you did a clean and build, it would first delete all compiled files for proj1 and Proj2 and then it would build proj1 First, followed by Proj2.

The below image explains the same in a more visual format.

VS in Build,rebuild,clean

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.