locked
How do I prevent msbuild from creating tlog files during my C++ builds? RRS feed

  • Question

  • We've discovered that the cl.*.tlog files often have stale/bad information for our C++ project.

    Reading this post: http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/ad60465d-fd89-4351-a749-4b4e9ab499d0 led me to add this XML at the top of all my vcxproj files:

    <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    
     <PropertyGroup>
    
     <TrackFileAccess>false</TrackFileAccess>
    
     </PropertyGroup>
    
    
    
    

    (I only add the PropertyGroup -- Included the Project element for reference)

    I've modified the projects and re-loaded the solution.

    Unfortunately, when I rebuild, I still have .tlog files being created. What piece of the puzzle am I missing to disable this disastrous file tracking feature?

    John


    • Edited by jschroedl Tuesday, March 29, 2011 5:49 PM Tweak
    Tuesday, March 29, 2011 5:37 PM

Answers

  • Hi Jschroedl,

     

    Thanks for your post.

    As you mentioned, <TrackFileAccess>false</TrackFileAccess>

    turn off the TrackFileAccess.

    As a result, no output file/intermediate file information will be write down to

    link.read.1.tlog

    link.write.1.tlog

    CL.read.1.tlog

    which makes VCBuild doesn't know if the output files exists.

    If you build project in IDE, the VC++ project system will help to check the timestamp,

    but if you build in command line, MSBuild directly calls VCBuild, but VCBuild only checks those files.

    Hope my reply helps resolve your issue.


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Victor_Chen Friday, April 8, 2011 10:00 AM
    • Marked as answer by Victor_Chen Monday, April 11, 2011 3:59 AM
    Wednesday, March 30, 2011 9:10 AM

All replies

  • More info... I deleted the old .tlog files and there is a 2-byte cl.read.1.tlog created now so it looks like the msbuild file tracking may indeed be turned off.

    But... now it wants to build the entire project for every build! This tells me that TrackFileAccess is the ONLY way that the C++ build system knows what files are out-of-date.

    Is there a way for me to get the old pPre-VS2010 time stamp checking? ie. the file list in the .vcproj file is checked against the .obj files.

    I do not want the 9.0 compilers used but it's clear that the IDE <--> MSBuild communication is broken since the tlog files can reference cpp files which have been removed from the .vcxproj. 

     

    Tuesday, March 29, 2011 6:10 PM
  • Hi Jschroedl,

     

    Thanks for your post.

    As you mentioned, <TrackFileAccess>false</TrackFileAccess>

    turn off the TrackFileAccess.

    As a result, no output file/intermediate file information will be write down to

    link.read.1.tlog

    link.write.1.tlog

    CL.read.1.tlog

    which makes VCBuild doesn't know if the output files exists.

    If you build project in IDE, the VC++ project system will help to check the timestamp,

    but if you build in command line, MSBuild directly calls VCBuild, but VCBuild only checks those files.

    Hope my reply helps resolve your issue.


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Victor_Chen Friday, April 8, 2011 10:00 AM
    • Marked as answer by Victor_Chen Monday, April 11, 2011 3:59 AM
    Wednesday, March 30, 2011 9:10 AM
  • Hi

    is it resolved?


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, April 8, 2011 10:00 AM