i tried it (VS 2022) for example with:
#Const toCompile = False #If toCompile Then //code #End If
and it worked.