Hi,
The IsRunningUnitTests() function is a run-time check, rather than a compile-time one. If you have trouble finding it, please try following our unit test tutorial with exactly the same device and framework as shown (you don’t need to run the code) and use Go-to-definition to locate it. You will then get a reference point that can be easily compared against your project.
If following the tutorial doesn’t work, please attach the relevant screenshots showing the difference, and we will try to help you.