title: MSBuild: Ignore targets that don't exist
body: <p>Solution1.sln contains two projects:</p>
  
  <ul>
  <li>ProjectA.csproj</li>
  <li>ProjectB.csproj</li>
  </ul>
  
  <p>ProjectB has a custom target called "Foo". I want to run:</p>
  
  <p>msbuild Solution1.sln /t:Foo</p>
  
  <p>This will fail because ProjectA doesn't define the "Foo" target. </p>
  
  <p>Is there a way to make the solution ignore the missing target? (E.g., do nothing if the target doesn't exist for a specific project) without modifying the SLN or project files?</p>