views:

47

answers:

4

I wanted to know if it is possible to know why a Visual Studio 2005 (MSBuild) build is taking a long time to build a project.

Suddenly we are getting 7-minute build times on some computers, while others take less, such as 4 minutes.

So I think I need to identify changes that were made to the project and are causing a longer build time.

Any ideas on how I can do that?

A: 

Is it a C++ project? I had the same problem when I moved my project from Visual Studio 6.0. Turning off the Code Optimization did save a lot of time. It was almost impossible to work with activated Optimization.

Holli
A: 

It re-evaluates the references on every build. If any of your references are on network drives that could be slowing it up.

Gus Paul
A: 

Some computers are naturally going to perform builds faster than others.. This is, in part, a function of processor, ram, and HD speeds.

Regarding why you see 7 minute build times there could be any number of reasons. Amount of code in project(s). Number of projects in solution. Amount of post / pre build steps. Speed of network in downloading anything from source control it needs. Number of other processes running on your computers. Amount of RAM and other resources available to perform the builds..

You get the idea.

Chris Lively
+1  A: 

Take a look at MSBuild Profiler to analyze where the slow down is. Based on that information, dig into what each task is doing and factor in the things that Chris mentions in his answer.

Agent_9191