none
Visual Studio rebuilding every file every time, after Anniversary Update.

    Question

  • When the Anniversary Update happened,  all versions of Visual Studio started rebuilding every file in every project, every time.

    Visual Studio 2015, Visual Studio 2012, and Visual Studio 2010 all exhibit the same behavior. Community and Pro. Brand new projects and old projects.

    On two separate computers at my location.
    On my main machine, I rolled back the update (which fixed the problem) so I could get on with my life. Now my laptop has updated and it's doing the same thing, but I can let this one get diagnosed instead of having to roll it back.

    Repro steps:
    * Create a brand new project, either "Win32 Console Application" or "Win32 Project"; follow the wizard's default steps.

    * Build the project - first time =

    1>------ Build started: Project: Win32Project2, Configuration: Debug Win32 ------
    1>  stdafx.cpp
    1>  Win32Project2.cpp
    1>  Win32Project2.vcxproj -> c:\....\Win32Project2.exe
    1>  Win32Project2.vcxproj -> c:\....\Win32Project2.pdb (Full PDB)
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

    * Immediately build the project again =

    1>------ Build started: Project: Win32Project2, Configuration: Debug Win32 ------
    1>  Skipping... (no relevant changes detected)
    1>  stdafx.cpp
    1>  Skipping... (no relevant changes detected)
    1>  Win32Project2.cpp
    1>  Win32Project2.vcxproj -> c:\....\Win32Project2.exe
    1>  Win32Project2.vcxproj -> c:\....\Win32Project2.pdb (Full PDB)
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

    The second build _should_ have reported all up to date instead of recompiling anything.

    Wednesday, October 12, 2016 8:39 PM

All replies

  • Hi Daniel Filner,

    According to your description, I create a Win32 Console project on my Windows 10 Anniversary Update machine and build it two time in my Visual Studio 2015 with Update 3. When I build it on second time, I get below Output message, which is not similar with yours.

    ========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

    But if I choose rebuild option on second build, I will get the same output with you. So please check whether you clean the solution before the second build.

    Then please check your Windows version through Run -> "winver", please share the detailed version information here. I will compare it with mine to check whether there has any difference.

    In addition, please check whether there has any updates after you upgrade to Anniversary Update. Make sure your Windows has installed all updates.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 13, 2016 5:16 AM
    Moderator
  • Thanks - yes I understand the difference between "Build" and "Rebuild" and "Clean".

    After posting the above problem, my laptop continued to get additional automatic updates installed and now the problem has resolved itself.

    Version 1607 OS Build 14393.321

    The updates today in reverse order were

    KB3194343 (Flash Player)

    KB3193713 (Silverlight)

    KB3118312 (Word 2010)

    KB890830 (Malicious Software Removal Tool)

    KB3194798 (Cumulative Update for Windows 10 1607 x64)

    KB3176936 (Update Windows 10 1607 x64)

    KB960089 (SQL Server 2005 SP2) - failed to install

    and "Feature Update to Windows 10 version 1607" which I believe was the start of the problem.

    So seemingly one of those updates fixed it.

    Or it just went away on its own.

    I look forward to attempting a new update on my main machine.

    Thursday, October 13, 2016 4:03 PM
  • Hi Daniel Filner,

    I'm glad that this issue has been fixed.

    I suggest you install these Updates one by one on your main machine to confirm which update fixed this issue. After confirm one of these updates fixed this issue, please mark you reply as answer, which is benefit to other communities who has the same issue.

    If any question about VS IDE, please feel free to come back to our forum.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 14, 2016 2:25 AM
    Moderator
  • Unfortunately the process suggested did not work on my main machine.

    Most of the updates I listed from the laptop weren't installable on the desktop (presumably because they were superseded by later cumulatives).

    So - rolled back again... still no anniversary for me.

    Thursday, October 27, 2016 11:12 PM
  • Hi Daniel Filner,

    I suggest you restore your main machine to the new installed Anniversary Update windows and then install Visual Studio to check this issue.

    Then install the Windows Update one by one, please restart your machine and rebuild your project after you install one updates. Although it take a long time and very inconvenient, it could help us confirm which specific reasons causes this issue.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 28, 2016 6:29 AM
    Moderator
  • OK here is the final result of the situation (as far as I can tell)

    1) https://blogs.msdn.microsoft.com/vsproject/2009/07/20/enable-c-project-system-logging/

    Using this page allowed me to get a specific reason (file A is newer than file B) why Visual Studio thought a project was out of date. Why you have to use secret diagnostics and a separate-process debugger to get such vital information is beyond me.

    2) The diagnostic output of Visual Studio indicates

    devenv.exe Information: 0 : Project 'G:\Projects\temp\console3\console3.vcxproj' not up to date because 'C:\WINDOWS\SYSTEM32\TZRES.DLL' was modified at 11/03/2016 19:26:32, which is newer than 'G:\PROJECTS\TEMP\CONSOLE3\DEBUG\CONSOLE3.ILK' which was modified at 11/03/2016 23:07:39.

    Note that this log was collected at 11/03/2016 4:15 pm (16:15) Pacific time = 2016-11-03 2315 UTC. So clearly something screwy is going on with file times.

    * 11/03/2016 19:26:32 is in the future.

    * 11/03/2016 23:07:39 is in the future AND is newer than the other file.

    File Explorer shows Console3.ilk modified at 4:15 pm local today (correct).

    File Explorer shows C:\WINDOWS\SYSTEM32\TZRES.DLL and most of the other files in the System32 folder modified at 7:15 pm local today which is in the future.

    So...

    [THE BUG] The Windows Anniversary Update dated a bunch of system files into the future: around 8 hours.

    [THE LINK] Visual Studio has those system files as dependencies and compares the dates of project files to them, causing rebuilds every time.

    [THE FIX] If I wait until 7:30pm tonight those System Files will be safely in the past again.

    This is what happened on the laptop - it wasn't additional updates, it was just the passage of time that fixed the problem.

    On my main machine to date I have not been able to allow the build system to stay broken long enough for future system files to become past (since I didn't know what was happening) and so I'd roll it back on the same day so I could keep working.

    Thursday, November 3, 2016 11:28 PM
  • I have a hunch that RealTimeIsUniversal could be the culprit in the generation of bad file times.
    Friday, November 4, 2016 2:57 AM
  • Hi Daniel Filner,

    Thanks for your response.

    According to the diagnostic output message, this issue is caused by the CONSOLE3.ILK file which stored under Project/Temp folder. As far as I know, the Temp folder often store some cache files. Please try remove this folder and then build your project again to check whether this issue could be fixed.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 4, 2016 6:49 AM
    Moderator
  • Sorry but you're off track.
    The Visual Studio project I created for test purposes was in g:\projects\temp\console3; it's not in a system temp folder.  Deleting that folder would in fact delete the project. The .ILK file named is a temporary working file which is rebuilt when the project links. Deleting the ILK file causes the project to be linked again. 

    As I said, the bug was that the Anniversary Update created files in the System32 folder that were time-stamped in the future. Now that a few hours have passed, those future-files are now in the past and cause no more trouble.


    Friday, November 4, 2016 11:59 PM
  • Hi Daniel Filner,

    Sorry for misunderstanding.

    Since I don't have such issue on my Anniversary Update machine, I could not confirm this is a bug for Anniversary Update.

    I want to know when the future-file created in the System32 folder. Are they created when Windows installed or build your project in Visual Studio?

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 7, 2016 6:56 AM
    Moderator
  • Many of the DLL and EXE files in Windows\System32  (approximately 767 files out of 4600 in that folder) are time-stamped 2016-11-03 7:26 PM - in the evening approximately 8 hours later than when I installed Anniversary Update. 

    This would not have been caused by rebuilding a simple default Visual Studio project. 
    It could have been caused if during the Anniversary Update the system misinterpreted the real-time-clock.

    Pacific Time Zone being UTC-8 suggests to me that during the update, the files being updated were written using a miscomputed time stamp. Then when Windows resumed normal operation the files seemed to be in the future.

    RealTimeIsUniversal is a system registry flag that tells Windows to interpret the RTC hardware as UTC rather than local time; if that flag wasn't respected during the update it would explain why files were off by 8 hours... although come to think of it the first time I tried this I was in UTC+12 so that theory is not well supported since I'd expect it to happen on either one side or the other but not both.

    anyway.


    • Proposed as answer by Johan OEhman Friday, December 2, 2016 8:36 AM
    Monday, November 7, 2016 2:00 PM
  • Last night I installed Anniversary Update. I got exactly the same problem as Daniel Filner when building projects in Visual Studio.

    After reading the posts in this thread I viewed the files in Windows\System32, and yes, the timestamps are several hours into the future causing Visual Studio to rebuild everything.

    If someone knows how to forward the information in this thread to Microsoft, please do so!

    Friday, December 2, 2016 8:36 AM
  • Hi Johan OEhaman,

    Since your problem both caused when upgrading to Windows 10 Anniversary Update and because of some files' timestamps are several hours into the future in Windows\System32, I suggest you post this issue to Windows 10 IT Pro forum to confirm whether this issue related to the operating system.

    In addition, this thread is asked one month ago. After confirm this issue, if it is not related to the operating system itself, please feel free to come back to post a new thread for this issue. Thanks for your understanding.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 5, 2016 1:09 AM
    Moderator
  • I just had the exact same problem and cause when installing the Creators Fall update.
    Wednesday, January 24, 2018 1:26 PM
  • And this problem raised again after today Windows update.

    Every system file is +4 hours in future.


    Friday, August 17, 2018 7:57 AM