is there a way in Visual Studio to use a custom Configuration like "#if DEBUG"
I need a "#if OFFLINE" as my Build-Config's name is "Offline" (only for further debug-purposes too)...
Thanks!
is there a way in Visual Studio to use a custom Configuration like "#if DEBUG"
I need a "#if OFFLINE" as my Build-Config's name is "Offline" (only for further debug-purposes too)...
Thanks!
Yes, this is possible.
Instructions:
Build
-> Configuration manager
-> Active solution configuration
-> New...
Offline
.Project
-> Properties
-> Build
-> Configuration
-> Offline
.OFFLINE
.Yes, you can. But before you can, follow these steps:
If you skip these steps, your #if OFFLINE
won't work because in that case, OFFLINE
isn't defined.
Define DEBUG constant
I had to add a semi-colon after OFFLINE
in the Conditional complication symbols
text box –
Radiosensitive I followed exactly the same steps as above. But they are not working. They are missing one steps or they didn't explain this clearly.
When you are doing step 4. Conditional compilation symbols: type OFFLINE. You also need to uncheck "Define DEBUG constant". Otherwise the new symbol OFFLINE won't work.
I posted this here in case someone wasted lots of time as me when try to do the same thing.
© 2022 - 2024 — McMap. All rights reserved.