John Livermore
John Livermore

Reputation: 31343

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__;

Upvotes: 7

Views: 2241

Answers (1)

John Livermore
John Livermore

Reputation: 31343

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!

Upvotes: 5

Related Questions