I am Upgrading my xamarin application to MAUI in there i am facing some errors.

Thevanan Kumaran 20 Reputation points
2024-04-09T06:39:46.2933333+00:00

we are using an xamarin application , currently we are upgrading to .NET MAUI , in there i am facing some errors "Severity Code Description Project File Line Suppression State

Error NU1107 Version conflict detected for Xamarin.Android.Support.Compat. Install/reference Xamarin.Android.Support.Compat 28.0.0.3 directly to project AmrricCore to resolve this issue.

AmrricCore -> Microsoft.Azure.Mobile.Client 4.2.0 -> Xamarin.Android.Support.CustomTabs 28.0.0.3 -> Xamarin.Android.Support.Compat (= 28.0.0.3)

AmrricCore -> Microsoft.IdentityModel.Clients.ActiveDirectory 5.2.8 -> Xamarin.Android.Support.v7.AppCompat 27.0.2.1 -> Xamarin.Android.Support.Compat (= 27.0.2.1). AmrricCore C:\Users\Lenovo\thev-2\app\App\FrontEnd\AmrricCore\AmrricCore.csproj 1

" could you pls help me to fix this

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,890 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 35,576 Reputation points Microsoft Vendor
    2024-04-10T03:07:44.9766667+00:00

    Hello,

    According to the .NET documentation's explanation of NU1107, you can follow the causes and solutions.

    Unable to resolve dependency constraints between packages. Two different packages are asking for two different versions of 'PackageA'. The project needs to choose which version of 'PackageA' to use.

    Solution:

    Install/reference 'PackageA' directly (in the project file) with the exact version that you choose. Generally, picking the higher version is the right choice.

    In addition, Xamarin.Android.Support.Compat has stopped updating since 2019, so it does not support the MAUI framework.

    To see if NugetPackage is compatible with MAUI and how to upgrade it, you can refer to Update app dependencies.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful