The problem is actually with our visual studio build.
For each build we increment the version number of binaries. We have a process that executes and updates the value in all proj files.
When visual studio compiles it adds assembly information to the registry for every .net file. Since the version number changed, the registry entry changes. The registry is never cleaned up. So I have just accumulated a year or more of registry entries.
When wise installer runs it is scanning through the registry, I am not certain why right now. Using ProcMon we can see the process running and reading the reg. Since the registry has bloated so much it slows down the build time.
Now the big question will be how to prevent this problem on a new build machine? How do I clean up all CLSID entries for our build?
On a pristine Win7 build system the entire build completes in under 20 min!
Also, I made one more change to the wise studio settings for the project. Instead of using high compression I switched it to mszip compression. Our output file is 50MB larger but the build time is far quicker - even on a new machine.
SOLUTION:
Add a clean solution task BEFORE changing the version number. This one change has resulted in a very consistent build time over several months.
The problem was that the company had changed the process of changing the assembly version and file version values. Little did we know that a rebuild was leaving assembly information in the registry on every build. So the task list now looks like:
- Clean .NET solutions
- Increment the version for file version and assembly version.
- Build .NET solutions
Hopefully this helps anyone else who encounters the same problem.