Skip to content

[One .NET] Missing AndroidSdkSupportedTargetPlatformVersion values #6107

@jpobst

Description

@jpobst

The file Microsoft.Android.Sdk.SupportedPlatforms.targets should include <AndroidSdkSupportedTargetPlatformVersion> versions for every API level we support (21 - 30). However in Preview 6, it only includes 30:

<Project>
  <PropertyGroup>
    <TargetPlatformSupported>true</TargetPlatformSupported>
    <TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">30.0</TargetPlatformVersion>
  </PropertyGroup>
  <ItemGroup>
    <AndroidSdkSupportedTargetPlatformVersion Include="30.0" />
    <SdkSupportedTargetPlatformVersion Include="@(AndroidSdkSupportedTargetPlatformVersion)" />
  </ItemGroup>
</Project>

This means a user cannot currently use eg: net6.0-android28.0 as a <TargetFramework>:

error NETSDK1140: 28.0 is not a valid TargetPlatformVersion for android. Valid versions include:
error NETSDK1140: 30.0

@jonathanpeppers says this is a regression and that it used to work.

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions