0

I have three different build configurations defined for my projects: Debug, RELEASE and PRODUCTION (Difference being in the fact whether we want to encrypt the db and create logs or we wan to do both or just one of these. Basically combinations of thsese three).

Now, in my code (which is a UWP app project) if I try and do something like this:

#if DEBUG

It works fine and the code written in this if block is enabled and compiled if target is set to DEBUG. However when I try and write something like #if RELEASE or #if PRODUCTION the code written inside these if blocks never get executed no matter if the target is set to RELEASE or PRODUCTION. So it looks like it's only able to figure out the DEBUG mode.

tavier
  • 1,744
  • 4
  • 24
  • 53

1 Answers1

0

Go to project properties and on Build tab in line "Conditional compilation symbols" add word "RELEASE" in release configuration and "PRODUCTION" in production configuration

Alexej Sommer
  • 2,677
  • 1
  • 14
  • 25