Skip to content

TargetFramework=net8.0-android33 gives poor error message #8331

@jonathanpeppers

Description

@jonathanpeppers

Android application type

.NET Android (net8.0-android, etc.)

Affected platform version

.NET 8

Description

.NET 8 is API 34, so 33 is invalid, but you get a poor error message:

Error    NETSDK1181    Error getting pack version: Pack 'Microsoft.Android.Ref.33' was not present in workload manifests.
C:\Program Files\dotnet\sdk\8.0.100-preview.7.23376.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets

https://discord.com/channels/732297728826277939/732297916680765551/1151549736269119549

It would be nice if we could emit a better message here, so see what the .NET SDK expects us to do.

Steps to Reproduce

  1. dotnet new android
  2. Put 33.0 on the TargetFramework

Did you find any workaround?

Remove 33.0

Relevant log output

No response

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.enhancementProposed change to current functionality.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions