Getting many errors when using Visual Studio Code

I’m starting to play around with the Workbench and tried compiling my project. It gave me around 250 errors. One of which is listed below. I’m using many if platform == in my project.

The same code compiled fine when I do it over the cloud outside of VS.

Does anyone know why the below is giving an error?

Are you sure that PLATFORM_ELECTRON_PRODUCTION and PLATFORM_P1 are defined and that PLATFORM_ID is set to one or the other? You could insert another #elif before #endif and insert the PLATFORM_ID into a Serial.print().

@armor im sure they are both working, I have these defines throughout multiple files. All is needed is to include Particle.h in the file

SOLUTION: I needed to pick the default target sytem to compile to in the settings. I had to choose defualt “electron” now it compiles