title: How to retrieve @(TargetOutputs) without performing a build
body: <p>I'm implementing an MSBuild framework to drive the building and deployment of many projects organized as a hierarchy.</p>
  
  <pre><code>&lt;Target Name="_CoreBuild"&gt;
    &lt;MSBuild Projects="@(Project)" Targets="Build" Properties="Configuration=$(Configuration)"&gt;
      &lt;Output TaskParameter="TargetOutputs" ItemName="CompiledAssemblies" /&gt;
    &lt;/MSBuild&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>In order to implement proper Clean/Clobber logic, I would like to retrieve the list of files that would be compiled if a build were performed with the current options.</p>
  
  <pre><code>&lt;Target Name="_CoreClobber" DependsOnTargets="_CoreClean"&gt;
     &lt;!-- How to retrieve @(CompiledAssemblies) as if we were
          building @(Project) and retrieving the @(TargetOutputs) item group.
       --&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>I've tried various methods, including creating a custom task, in which I build a custom project file that imports the original project I want to retrieve the properties/items from. But that does not give me reliable values.</p>
  
  <p>Is there a way to retrieve an MSBuild project's TargetOutputs item group without actually performing a build?</p>