I want to make the import dependent on the purpose for which I invoke MSBuild from the command line, but I find it difficult to determine how to programmatically access the target name (s). File file was called using
t <Import Project="some.targets" Condition="$(TargetName) == myTarget"/>
In general, is there a way to reset all the specific environment variables that exist at runtime of the proj file?
source
share