Reason why VS 2008 project rebuilds every time

Is there a way to find out why the project is being rebuilt every time . Operation Build Selection issued in VS 2008?

I tried to remove all dependencies from Build \ Configuration Manager (unchecked build checkbox for all builds, but the one in question).

I get the same result: the assembly is rebuilt every time.

I must mention that all dependencies are built in the same directory (there is a common output directory).

Actually I'm not very clear on what the VS / MSBuild algorithm is to decide if a project needs to be rebuilt or not. Does it check for dependencies (files / assemblies) that have a NTFS last access timestamp later than the one on the assembly in question? Perhaps I could try to find the "offending" file this way.

+2


source to share


6 answers


I didn't find the root cause of the problem, but I found a way to get rid of the effects:

GetLatestVersion (with the "overwrite existing" option).

Now everything is all right.



Another thing that I found out unfortunately after I overwrote the local project files with the Workspace version: there is an option in Tools-Options-Projects and Solution-Build and Run-MSBuild build build output verbosity options .

By default, this parameter is set to Minimum . If in Details or Diagnostics , a lot of interesting messages will be written to the Output window when the project is compiled. Perhaps he gave me directions as to why the project is being drawn up every time.

0


source


Do you have a Prebuild action that defines some of your input files? This could also be due to a custom build step, which is always a trigger.



What type of project do you have?

+3


source


Is there a circular dependency between different modules / projects in your application?

+1


source


If you change AssemblyInfo.cs with an updated version of AssemblyFileVersion (as with Cruise Control.Net), for example, I find that it forces a rebuild.

+1


source


This could be caused by improper handling of the (recently added) MSVC 2008 prebuild rules. Make a clean, closed MSVC, delete the .pch and .ncb files, start MSVC again, and build. This should fix unnecessary compilation.

+1


source


I'm not 100% sure, but it seems that projects with any warnings will always recover.

0


source







All Articles