title: Is there a way for a program to detect if it was called by MSBuild or not?
body: <p>I'm looking in the environment but I can't see anything that I could use.  Any ideas?  </p>
  
  <p>I'm trying to submit a patch for in <a href="http://code.google.com/p/waf/" rel="nofollow noreferrer">Waf</a> a bug that only appears when running the build under MSBuild (...yes I know, it sounds crazy but we're driving our Teamcity server using MSBuild).</p>