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

I look into the environment, but I do not see anything that I could use. Any ideas?

I am trying to provide a patch for Waf with an error that appears only when the build is started under MSBuild (... yes I know this sounds crazy, but we manage our Teamcity server using MSBuild).

+3
source share
2 answers

While I can’t say exactly how to do this, I know that you can do it.

You should look at the functionality to find the parent process and then the name of the executable file to determine if the MSBuild.exe file is or not.

, .

+2

, , - MSBuild.exe? , .

0

Source: https://habr.com/ru/post/1724264/


All Articles