title: MSBuild to copy dynamically generated files as part of project dependency
body: <p>I have a custom msbuild task that is generating some output files to the output directory ($(TargetDir)) of a ProjectA. Current code is something like this:</p>
  
  <pre><code>&lt;MyCustomTask ...&gt;
     &lt;Output TaskParameter="OutputFiles" ItemName="FileWrites"/&gt;
  &lt;/MyCustomTask&gt;
  </code></pre>
  
  <p>A ProjectB is referencing <em>ProjectA</em> but the problem is that when building ProjectB, generated files by MyCustomTask are not copied to the output directory of the ProjectB. </p>
  
  <p>How can we get dynamically generated additional files to be copied as part of project dependency with MSBuild?</p>