-2

I've a .NET MAUI project setup with the nuget packages for CommunityToolkit.

it says that it's not available for android.

enter image description here

Dean Van Greunen
  • 5,060
  • 2
  • 14
  • 28

1 Answers1

1

The version of your CommunityToolkit.Maui requires Android or other platform dependencies to be net7.0

You can see the comparison of two different versions.

Update .NET MAUI to .NET 7

Open your .NET MAUI app csproj file and find your the TargetFrameworks node(s):

<PropertyGroup>
        <TargetFrameworks>net6.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
       ...
</PropertyGroup>

Replace net6.0 with net7.0:

<PropertyGroup>
        <TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
       ...
</PropertyGroup>

Save the csproj file at last.

Jianwei Sun - MSFT
  • 2,289
  • 1
  • 3
  • 7