Compiler directive Target xxx for Workers

Is there a way to do the following ?

#If not TargetWorker Then

// Code I don't want to be compiled into Worker console app
 
#EndIf

I tried:
#If not TargetConsole Then
but that doesn’t make any difference.

I need to include a class in my Worker of my Mac/Win desktop app that contains code that can’t be run in a console app.

I’d make sure that none of the parent classes have been marked as “desktop” in the attributes section.

That said, you might be able to separate the class into a class-subclass, putting the console-only portions in the class and making a subclass which contains the non-console portion.

1 Like