I work on a large Visual C++ (MFC) project in VS.NET 2005.

I have noticed strange behavior in Visual C++ 2005. Often, I will change one line of code in a .CPP file but many .CPP files will compile as a result of this. I have never seen this until VS.NET 2005. Theortically, changing a line of code in a .CPP file should simply require recompilation of that .CPP file and re-linking of the PE file.

What am I not understanding about the build process.


This is a strange bug in the VS2005 dependency behavior. To find out one suggestion would be to take the following steps:

  1. Go to Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild Project Build output Verbosity and select Detailed

  2. Compile your project.

This will give you a detailed output of the build which "may" help you arrive at a solution to your problem.

VC++ 2005 doesn't use MSBuild to build, right? I think this setting will have to effect on VC++. I tried it and my build output was no different.
VC++ 2005 and 2008 _don't_ use MSBuild, so this setting won't have any effect.
Roger Lipscombe
+1  A: 

I found this link helpful when solving a similar problem, was under pressure at the time, I tried a few things and the issue went away, for the life of me I don't know (or can't remember) which - if any - helped.

Hope this helps

Binary Worrier