Build and Rebuild solutions
Let’s now talk about one of basic thing about compiling project/website in visual studio .Net.
Visual Studio provides two options to compile or build application-
1. Build solution
2. Rebuild solution.
These options can be accessed from Build menu-
Difference between these two options are-
Build Solution | Rebuild Solution | |
1. | Build means compile and link only those project files and components that have changed since last build. | Rebuild means compile and link source files regardless of whether they changed or not. |
2. | Build is the normal thing to do and is faster. | As it compiles all files it takes time. |
3. | E.g. You have two projects A & B in your solution, when you compile the solution using Build option after making some changes in Project A, then only Project A will be compiled but project B will not as there are no changes in it. | E.g. You have two projects A & B in your solution, when you compile the solution using Re-Build option after making some changes in Project A, both projects A & B will be compiled and built even though there are no changes made in project B. |
4. | Sometimes the versions of project components can get out of sync and at that time Rebuild is necessary to make build successful. |
Hope this information is useful.