Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way for a program to detect if it was called by MSBuild or not?

Tags:

msbuild

waf

I'm looking in the environment but I can't see anything that I could use. Any ideas?

I'm trying to submit a patch for in Waf 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).

like image 701
jkp Avatar asked Jun 02 '26 02:06

jkp


1 Answers

Whilst I can't tell you exactly how to do it, I know you can do this.

You should look at functionality to find your parent process and then it's executable name to determine if it's MSBuild.exe or not.

Hope that helps to at least point you in the right direction.

like image 120
Tom Duckering Avatar answered Jun 03 '26 15:06

Tom Duckering



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!