Search code examples
android.netcompiler-errorsmauinuget-package

why i have this problem with this Nuget package


I have created a new project on visual studio .net maui. I´m trying to install the NugetPackage CommunityToolkit.Maui version 9.01

enter image description here

But when I install it, an errors appears and I have to unistall it.

enter image description here

I don´t have any other package installed. The first thing I do is to install this package.

If i install the 8.0.0 version i have the same errors.

But if I install 7.0.1 version it works.

Can anyone tell me why this problem happen?

Thanks

Know the cause of this problem


Solution

  • Edit your project file (Double-click)

    Replace matching/Add missing PackageReference with the following

    <ItemGroup>
        <PackageReference Include="CommunityToolkit.Maui" Version="9.0.1" />
        <PackageReference Include="CommunityToolkit.Maui.Core" Version="9.0.1" />
        <PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
    
        <PackageReference Include="Microsoft.Maui.Controls" Version="8.0.40" />
        <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.40" />
        <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
    </ItemGroup>