I am running on Windows and have this peace of code:
#If TargetMacOS Then
Var a As Integer = “Joost”
As the target to build for I select MacOS. And of course, when I build the application for mac, I get a Type Mismatch Error.
But, when I don’t build, but instead I press Ctrl-K to analyse the project, It doesn’t give me this information.
According to me this is inconsistent behavior.
What does the community think ? Is this a bug ?
Analyze Project only checks your current platform when it comes to these bits.
Right. The only way to check that code is to actually build for the target platform.
I wish there was a “Analyze For -target-” though.
This would be the best solution I think Kem.
I am going to check if there is already a feature-request for this.
And this is very unhandy. I work around to create a line as shown above and have the build stopping there.
Thanks Gavin. Since 2008 …
I’ve put this case on my list to research for r2. I make no promises about adding it for r2, but I am curious if the new build changes added in 2022r1 might make it more practical to implement this (very useful) feature suggestion.