title: Rules for Custom build's <Outputs> tag check for directories changed in Visual Studio 2019?
body: <p>Lets make obscure question simple...</p>
  <p>We have a solution which consists of many projects and some of them have set Custom build events using 3rd party stuff for some dark magic compilation and looks similar like this:</p>
  <pre><code>&lt;CustomBuild Include=&quot;..\folder\somestuff.xyz&quot;&gt;
    &lt;FileType&gt;Document&lt;/FileType&gt;
    &lt;Command Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;C:\Tcl\bin\tclsh.exe $(APP_PATH)\modules\APP\bin\generator.tcl -o %(RelativeDir)%(Filename) %(RelativeDir)%(Filename).xyz&lt;/Command&gt;
    &lt;Message Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;APPGEN %(RelativeDir)%(Filename)&lt;/Message&gt;
    &lt;Outputs Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;%(RelativeDir)%(Filename).cpp;%(RelativeDir)%(Filename).h;%(RelativeDir)%(Outputs)&lt;/Outputs&gt;
  &lt;/CustomBuild&gt;
  </code></pre>
  <p>This was working properly until we switch form VS2015 to VS2019 as now during the compilation it reports that:
  <code>Project is not up-to-date: build output 'd:\projects\program\app\src\plugins\shared\' is missing</code>. This would be more or less ok, but it forces the compiler to recompile also the dependencies of this project and this start to be really annoying as you need to rebuild several projects everytime even when no changes were done.</p>
  <p>I found out that the problem originates from this line of Custom build:</p>
  <pre><code>&lt;Outputs Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;%(RelativeDir)%(Filename).cpp;%(RelativeDir)%(Filename).h;%(RelativeDir)%(Outputs)&lt;/Outputs&gt;
  </code></pre>
  <p>More precisely from this part: <strong>%(RelativeDir)%(Outputs)</strong> as the check for <em>.cpp</em> and <em>.h</em> file in the same tag do not generate any issues. So I removed this check for directory. When this chunk of code is removed the project compiles properly and do not re-compile all day long.</p>
  <p><strong>So why the Custom build's Output check is now working properly just with files and directories are generating this kind of issue?</strong></p>
  <p><em>And yes, the examined dir exists and it refers to the existing correct path.</em></p>