title: "#if __ANDROID_30__" and "#if ANDROID30_0_OR_GREATER" missing?
body: <p>After having created a new Xamarin.Android project, the <code>#if</code> directives mentioned in the title (and other similar conditions) appear to be missing or, at the very least, not recognised.</p>
  <p>Here are the relevant parts of the <code>.csproj</code> file:</p>
  <pre><code>&lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;net6.0-android&lt;/TargetFramework&gt;
      &lt;SupportedOSPlatformVersion&gt;21&lt;/SupportedOSPlatformVersion&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
  &lt;/PropertyGroup&gt;
  &lt;PropertyGroup Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|AnyCPU'&quot;&gt;
      &lt;DefineConstants&gt;$(DefineConstants)TRACE&lt;/DefineConstants&gt;
  &lt;/PropertyGroup&gt;
  &lt;PropertyGroup Condition=&quot;'$(Configuration)|$(Platform)'=='Release|AnyCPU'&quot;&gt;
      &lt;DefineConstants&gt;$(DefineConstants)TRACE&lt;/DefineConstants&gt;
  &lt;/PropertyGroup&gt;
  </code></pre>
  <p><code>#if DEBUG</code> works fine although not explicitly defined above. I just assumed <code>#if ANDROID30_0_OR_GREATER</code> would work without having to explicitly define the constant. Albeit, IntelliSense seems to suggest these without any issues.</p>
  <p><a href="https://i.stack.imgur.com/vVD4f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vVD4f.png" alt="Unrecognised #if directive. The warning is: &quot;This call site is reachable on: 'Android' 21.0 and later. 'BackPressConfirmationHandlerV30' is only supported on 'Android' 30.0 and later.&quot;" /></a></p>
  <p>Although the device selected only supports API 21, the <code>#if ANDROID30_0_OR_GREATER</code> is what seems to be triggered regardless (and the same applies for <code>#if __ANDROID_30__</code>); switching between a device with API 21 and API 30 seems to make no difference.</p>
  <p>Am I missing something rather obvious? How can I get this to work?</p>