Xamarin : Could not install package Parse 1.7.0 - xamarin

I am currently working on a cross-platform app with Xamarin and I am trying to use the NuGet package Parse 1.7.0, but when I try to install the package via NuGet on Visual Studio 2015, I get this error :
Could not install package 'Parse 1.7.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.
Is it to understand the Parse official package is not compatible with Xamarin ? If so, is there a way to make it compatible ?
Thanks in advance !

If you look inside the nupkg of this package:
https://www.nuget.org/packages/parse
You will find a lib folder with the following targets available. Thus you are trying to target Profile259, but there is no definition in the Parse NuGet package for this. That is why it fails. You must install against one of these targets instead.
Thus if you installed this individually into MonoAndroid or Xamarin.iOS10, it work install just fine (Xamarin.Android and Xamarin.iOS projects respectfully).

Had the same, just remove the Silverlight platform from your targets and it should work

Related

Error Could not install package 'Microsoft.Build.Framework 14.3.0'

I have used visual studio 2019, I have added some NuGet packages but it's show error like..
Error Could not install package 'Microsoft.Build.Framework 14.3.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v9.0', 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.
Note: My Xamarin Binding library(Android) solution target version9.0.
please help me to resolve this issue.
Try by updating your Microsoft.Build.Framework package to the latest version (at the moment it is 16.0.461).
You can check it also here: https://www.nuget.org/packages/Microsoft.Build.Framework/
Once I copied the build task property section from my iOS csproj to my Android csproj.. I got a slightly different message. It asked me to add Microsoft.Build.Utilities.Core.
I then had to add the Microsoft.Win32.Registry 5 nuget then as it tried to install 4.3.0 which my Android project didn't like.

Plugin.FirebasePushNotification installation error in Xamarin forms

While installing Plugin.FirebasePushNotification getting error-
Could not install package 'Xamarin.Firebase.Messaging 60.1142.0'.
You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.0', 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.
after updating Android API 7.0 this installation works well(when create a new project)
BUT i already have a project with compile version Android 6.0.
While installing this plugin on this project then it shows same error.
So how to solve this installation issue on my previous project?
You need to set your <TargetFrameworkVersion> to Android 8.0 or greater.
https://developer.xamarin.com/guides/android/application_fundamentals/understanding_android_api_levels/#framework
https://www.nuget.org/packages/Xamarin.Firebase.Messaging/ version 60.1142.0 only includes a MonoAndroid80 folder which means it requires APIs from Xamarin.Android 8.0 at a minimum to compile against.
If you want to figure this out yourself, do the following:
Download https://github.com/NuGetPackageExplorer/NuGetPackageExplorer
Download the NuGet via Manual Download
Open the .nupkg
Expand the lib folder to see the respective target frameworks

Cannot install Microsoft.NETCore.UniversalWindowsPlatform

Seemed to be related to this:
Nuget error install package Microsoft.NETCore.UniversalWindowsPlatform
but it is not, because the checkbox is checked by default in vs2017. I am running the creators update by the way and everything is up-to-date.
I have just started a new C# background IoT project and got this:
When manually installing the package in the package console I got this:
...
Successfully installed 'Microsoft.Net.Native.Compiler 1.6.0' to projectnamehere
Install failed. Rolling back...
Package 'Microsoft.NETCore.Jit.1.0.3' does not exist in project
...
Package 'Microsoft.NETCore.Jit.1.0.3' does not exist in folder
...
Install-Package : Could not install package 'Microsoft.NETCore.Jit 1.0.3'. You are trying to install this package into a project that targets '.NETCore,Version=v5.0', but the package does not contain any assembly references or content files that are compatible with that f
ramework. For more information, contact the package author.
seems related to this https://connect.microsoft.com/VisualStudio/feedback/details/1617801/newly-created-universal-app-projects-dont-work
but I have no idea how to fix it.
I have also seen a website suggesting to remove the project.json file, which I did but did not resolve it.
I have also closed vs2017 and modified the installtion to verify that the creators update sdk was checked and installed.
I have lowered the target version in the project props, but that did not help either.
edit manual install the jit package did not work either:
Could not install package 'Microsoft.NETCore.Jit 1.1.1'. You are trying to install this package into a project that targets '.NETCore,Version=v5.0', 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.
edit2 funny thing is that the solution explorer tells me that there is a project.json while there is none in windows explorer:
I verified the sdk installation by hitting the modify button of the vs2017 installation and tried to create a new project afterwards but got the exact same issue again.
Update: Microsoft updated the templates in their github (https://github.com/ms-iot/samples/commit/2e2aa34ab514b8c0725a53263898a412e0a1be1c) but didn't push it as an updated templates package to Visual Studio yet. Changed the answer accordingly.
Temporary fix:
replace in your .csproj file
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
with
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
add the Microsoft.NETCore.UniversalWindowsPlatform package
Optional extra:
Add the Windows IoT Extension SDK via the references dialog
This issue has been fixed for Visual Studio 2017 in updated templates released here: https://marketplace.visualstudio.com/items?itemName=MicrosoftIoT.WindowsIoTCoreProjectTemplatesforVS15

Xamarin.Support.v7.RecyclerView

Hi I'm trying to install via nuget Xamarin.Support.V7.RecyclerView however I'm getting the following error :
"Could not install package 'Xamarin.Android.Support.v7.RecyclerView
25.1.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', 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. "
i think this it will help you.
try to update or download new version xamarin visual studio it will give you monoandroid v7 to be worked and set your Droid TargetFrameworkVersion to Android 7.0 or bigger.
Xamarin new version go www.https://www.xamarin.com/ -> login -> Profile -> Dashboard -> Download
try to update android sdk Android 7.1.1(API 25)
After all done install again Xamarin.Support.V7.RecyclerView, it will work

unable to install Xam.Plugin.Iconize.FontAwesome 1.0.10

I am trying to install Xam.Plugin.Iconize.FontAwesome 1.0.10 in my xamarin forms project, but I am getting the following error. Anybody had success with this ? I have xamarin forms 2.3.107 installed
Could not install package 'Xam.Plugin.Iconize.FontAwesome 1.0.10'. 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.
if anybody has a working solution please help me

Resources