Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a custom conditional compilation symbol with Visual Studio 2017?

In VS2017 I have defined a conditional compilation symbol 'APPSTORE'.

enter image description here

However the compiler is not recognizing the symbol. Notice the APPSTORE code is disabled.

enter image description here

What is the proper way to use conditional compilation symbols?

Instead of a semicolon, I have tried a comma as well...

APPSTORE,__UNIFIED__;__MOBILE__;__IOS__;
like image 688
John Livermore Avatar asked Oct 18 '22 06:10

John Livermore


1 Answers

The code I was trying to control was in a different assembly than the assembly where I set the conditional compilation symbol. Once I entered the symbol in the correct project, it behaved as expected. Thanks to @SushiHangover!

like image 174
John Livermore Avatar answered Nov 15 '22 09:11

John Livermore