Monday, June 15, 2009

VisualStudio.Net provides us with two options for compiling and creating builds for our application. They are Build Solution and Rebuild Solution options which can be accessed from the Build menu. The differences between these two options are

1. The Build Solution option compiles only those project files and components that have changed since the last build. For example consider that you have two projects A and B in your solution. When you compile the solution using Build Solution option after making some changes to A only A will be compiled and built but B will not be compiled since there are no changes to it.

2. On the other hand the Rebuild Solution option builds all project files and components irrespective of the changes made to them. For example consider that you have two projects A and B in your solution. When you compile the solution using Rebuild Solution option after making some changes to A, both A and B will be compiled and built even though there are no changes made to B.

When we encounter unexpected build errors for Post Build and Prebuild commands.

It is always advisable to do the following:

1. Remove..%temp% files

2. Use “Clean Solution”

3. Building the solution starting from the most independent project..to the most dependant project