title: MSBuild - Target Dependent Imports
body: <p>I want to make an import dependent on which target I call MSBuild with from the commandline but I'm having a hard time figuring out how to programatically access the target name(s) the .proj file was called with</p>
  
  <p>i.e.<b>
  <code>&lt;Import Project="some.targets" Condition="$(TargetName) == myTarget"/&gt;</code></b></p>
  
  <p>In general is there a way to dump all defined environment variables that exist at proj file runtime?</p>