I'm trying to use the #if
directive so that a given method runs only after it is published (in release mode).
The code is something like
#if !DEBUG
AlgumMetodo();
#endif
I've also tried to add ConditionalAttribute
to the method signature
[Conditional("RELEASE")]
private void AlgumMetodo() { ... }
The problem is that in both ways the never method runs, it does not matter whether it's in release or debug mode. >
I have checked the project properties in the build tab. In the release configuration the checkbox define DEBUG constant
is unchecked and in the debug configuration it is checked.
Are there any other settings that I can check or something I am doing wrong?