title: File Tracker Log file format
body: <p>In Visual Studio 2010 incremental builds are done using the File Tracker (Microsoft.Build.Utilities.FileTracker). It seems that it is responsible to the creation of these *.1.tlog files on the intermediate directory.</p>
  
  <p>I couldn't find any reference to the syntax of these .tlog files.<br>
  They contain a list of paths to files that are read/written while the tracker tracks the execution of some tool, in order to check which files should be compiled in an incremental build. However, these files also contain some special characters such as "^" and "|".<br>
  Another thing I noticed was that these files are sometimes edited from Visual Studio targets files. For example, in Microsoft.CppCommon.targets on CustomBuildStep target I found the following line:</p>
  
  <pre><code> &lt;!-- Appended tlog to track custom build events --&gt;
      &lt;WriteLinesToFile File="$(IntDir)$(ProjectName).write.1.tlog" Lines="@(CustomBuildStep-&gt;'^%(Identity)');@(CustomBuildStep-&gt;MetaData('Outputs')-&gt;FullPath()-&gt;Distinct())"/&gt;
  </code></pre>
  
  <p>So this probably means that the project file is dependent on the custom build step outputs.</p>
  
  <p>My questions are:  </p>
  
  <ul>
  <li>Does anyone know of a reference for the .tlog file syntax?</li>
  <li>In which cases is the tracker-log used on Visual studio? I know of the CL and maybe Link tasks that use it, but it seems that Visual Studio IDE itself uses it in order to decide whether to run msbuild at all for a certain project.</li>
  </ul>
  
  <p>Thanks</p>
  
  <hr>
  
  <h1>EDIT</h1>
  
  <h2>Another hint:</h2>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/dd985005.aspx" rel="noreferrer"><code>CanonicalTrackedInputFiles Class</code></a> is document as "<em>the filetracking log interpreter for .read. tracking logs in canonical form or those that have been rooted (^) to make them canonical</em>"<br>
  When I have time I'll dig into it a bit more. Perhaps this class and others under <a href="http://msdn.microsoft.com/en-us/library/ms126181.aspx" rel="noreferrer">Microsoft.Build.Utilities</a> could be used to help us work with tlog files instead of working with the raw text tlog files directly.  </p>
  
  <p>See also: <a href="http://msdn.microsoft.com/en-us/library/microsoft.build.utilities.canonicaltrackedoutputfiles.aspx" rel="noreferrer"><code>CanonicalTrackedOutputFiles Class</code></a>, <a href="http://msdn.microsoft.com/en-us/library/microsoft.build.utilities.flattrackingdata.aspx" rel="noreferrer"><code>FlatTrackingData Class</code></a> and of course <a href="http://msdn.microsoft.com/en-us/library/microsoft.build.utilities.filetracker.aspx" rel="noreferrer"><code>FileTracker Class</code></a>.</p>