#if conditionals doesn't highlight code properly #17940
-
Parts of my code should only execute on Windows, for which I use the HAS_UNO conditional. However, in Visual Studio, the code appears to be disabled, even though it actually runs. Visual Studio should enable or disable the code depending on whether it is for Windows or another platform. |
Beta Was this translation helpful? Give feedback.
Answered by
morning4coffe-dev
Aug 14, 2024
Replies: 1 comment 2 replies
-
Hey @mcNets, This actually depends on the platform you have selected at the top of the editor and it is not related to the currently targeted platform. Try switching between platforms there to see if it works: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don’t think so, as that’s not how VS handles this—it only highlights when you change the editor platform:
Should the editor platform change when you change the target platform? Maybe, but I don't think that’s currently supported by our SingleProject implementation in VS. 🤔