No idea since this works just as I expect in 2017r1.1
I created a new desktop project
Added a boolean constant “lite” to the App instance
On Window1 I put a label that has in its open event
If app.Lite Then
Me.Text = "lite"
Else
Me.Text = "pro"
End If
Created a new IDE script using File > New IDE Script
Pasted your original code in
Ran that script
I get a LITE.exe built and a PRO.exe built
And when I run those apps they properly report as lite and pro as I expect
OK, it’s something related to MY project… as if I try it with a NEW project it works as expected… so… Where could I start looking to find the problem ?
What happens is that in this particular project constant values don’t chane with the IDE script…
The common confusion is because at runtime you can get a reference to the Application subclass using “App”
BUT - at runtime App is a METHOD that returns the singleton that is created from whatever your project Application subclass was called
By default a new project creates the subclass named “App” - which leads to this lack of clarity
Folks get confused between the runtime name and project item name