4
votes

Im trying to install Xamarin.Firebase.Messaging I got this error:

Could not install package 'Xamarin.Firebase.Messaging 42.1001.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Im try to change the target profile to 78 and nothing happend.

Thank you for helping!

2

2 Answers

7
votes

You are trying to install this package into a PCL project. You can only install this package into a Xamarin.Android project as there are no targets for this NuGet package to install into a PCL.

There are two main ways of figuring this out:

1) Look at the "Dependencies" on NuGet

2) Download the .nupkg, extract, and look in the libs to see the Target Frameworks supported

In this case, only MonoAndroid70 is supported. This is synonymous with Xamarin.Android targeting API 24 minimum.

https://www.nuget.org/packages/Xamarin.Firebase.Messaging/

0
votes

I faced the same issue, and I am installing Xamarin.Firebase.Messaging package to Xamarin.Android project not on the portable class library.

I fixed it by deleting bin and obj folder restarting the visual studio and clean solution.

After that, it got successfully installed.