rerun
rerun

Reputation: 25495

Visual Studio forcing Project to be rebuilt every time

I have a solution with Many dlls and two exe's. The exes are Dependant on the dlls when I make an internal change to any of the dlls one of my exes rebuilds and generates all its code every time. My assumption would be that it would only need to relink if no source file it depended on had changed. Could there be a setting I am missing causing it to do a full rebuild every time.

Upvotes: 1

Views: 1338

Answers (3)

Johan R
Johan R

Reputation: 11

I had the same issue, and was getting frustrated with the constant rebuilds. For me it was a fairly simple solution. I had just made a re-install of my computer and had found that I had set the date incorrectly. So this evening I changed the date back one day...

This resulted in me having files with a last changed timestamp on several files in my project one day in the 'future', and thus constant rebuilds.

Upvotes: 0

miked
miked

Reputation: 3598

This usually happens if the exe is dependent on a .h file from your dll project (includes the .h). If you change the .h it will make the exe rebuild. If you change the .cpp, the exe shouldn't rebuild. At least that's how it works for me. Generally DevStuido is smart enough to figure out what needs to be rebuilt and only builds what needs to be done.

Upvotes: 0

BlackICE
BlackICE

Reputation: 8926

I am pretty sure that Studio (more specifically MSBuild) does not track dependancies at the source file level, so when you are changing the source to the dll, all visual studio sees is that a dll that it depends on has changed, so it rebuilds the exe.

Upvotes: 1

Related Questions