I am developing iOS and Android app with Xamarin Forms in MAC. I am installing PCL Xamarin.Mobile, but i am getting error - xamarin.forms

The error i am getting while installing PCL. Any idea about below mentioned error?
Could not install package 'xamstore-xamarin.mobile 0.7.1'. 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.

From Xamarin Developer Matt Ward on the Xamarin Forums
The NuGet package xamstore-xamarin.mobile 0.7.1 only supports MonoAndroid and MonoTouch. It contains MSBuild property files for these two frameworks. You will not be able to install it into a Portable Class Library (PCL) project since it does not have any files that target any PCL framework.
Instead you should be able to add it to a Android or iOS project.
Similarly Xamarin.Mobile from the component store supports Android and iOS projects. It has assemblies for those platforms as well as for Windows Phone 7/8 and Windows 8 (WinRT). So you would be able to add that component into an Android or iOS project but not a PCL project.

Related

Project App.Droid cannot build using TargetFrameworkVersion v8.1 because it is not supported

Having this issue when trying to build Xamarin.Android project (Xamarin.Forms)
Project App.Droid cannot build using TargetFrameworkVersion v8.1 because it is not supported. Please change your Xamarin.Android project to target an API version that is supported.
How do I resolve this issue?
I think I have installed SDKs I need, screenshot is here
After upgrading my VS2017 v.15.3.5 to v.15.7.5, I was able to install newer Android SDKs and tooling and all went well after that.

Unable to install Nuget package in my Xamarin Cross Platform Application

I am developing a xamarin cross platform that is composed of following projects
1)Portable
2)IOS
3)Android
4)UWP
I am facing an issue while installing NuGet package for the xamarin portable project. Actually the NuGet that i am trying to install is targeted on .net Framework version 4.5.2. So we need the .net Version 4.5.2 or higher in our application in order to install this library. However when i try to change target framework version in my project properties to 4.6 then also i am facing the compatibility error that given package is not compatible with .net 4.5.
So what is the correct way that to set the .Net framework version in the project so that i can install it any project.
I have also referred to this doc by Microsoft
https://learn.microsoft.com/en-gb/dotnet/standard/net-standard#comparison-to-portable-class-libraries
that shows compatibility matrix.
I think it is related to .net standard 2.0. use these links
https://xamarinhelp.com/upgrade-pcl-net-standard-class-library/
https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-standard-2-0/

Xamarin forms failing ti install NotificationHub Nuget in UWP project

Trying this : https://learn.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-push, using VS 2017 portable Xamarin Forms project. Except UWP all other projects including IOS , Android and Portable library are getting installed with the Notificaiton nuget package. In UWP its always failing with the below error message. Thanks for your help.
Package Microsoft.Azure.NotificationHubs 1.0.9 is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240) / win10-x86-aot. Package Microsoft.Azure.NotificationHubs 1.0.9 supports: net45 (.NETFramework,Version=v4.5)
As of July 2016 Notification Hubs SDK is not available for UWP. The product team is aware of it and working on providing it.
At the moment, there are one way to workaround it:
Use WindowsAzure.Messaging.Managed Nuget package as described in Getting started with Notification Hubs for Windows Universal Platform Apps
Certain Hubs SDKs are open sourced. But, unfortunately, not Windows ones at the moment.

Error installing System.IdentityModel.Token.Jwt in Xamarin.Forms

I'm trying to use the System.IdentityModel.Token.Jwt NuGet package for my Xamarin.Forms app. When I try to add the package to my PCL, it installs in my Android and iOS projects, but I get the following error when adding it to the shared code project:
Could not install package 'System.IdentityModel.Tokens.Jwt 5.1.3'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.6,Profile=Profile44', 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.
Does anyone know how to get around this? I think it has to do with what my project targets but I've tried a few combinations and all of them have produced the same error, just with a different profile listed.
Unfortunately the System.IdentityModel.Tokens.Jwt 5.1.3 NuGet package only contains assemblies that support:
.NET Framework 4.5.1
.NET Standard 1.4
No portable class library profile supports .NET Standard 1.4. The highest they support is .NET Standard 1.2.
So unless you can find another NuGet package that does support portable class libraries you are left with trying to compile the Jwt source code for the portable class library profile you need, or converting your portable class library project into a .NET Standard project and target at least 1.4. You should be able to convert your portable class library project into a .NET Standard project in the project options.

How to Install MVVMLight in Xamarin Studio Xamarin.Forms PCL

I think this is related to this -
Cannot install MvvmLight for Windows Phone 8.1 app project
Trying to install libs only nuget. Seen a PCL version mentioned somewhere but its not in the Nuget list.
Could not install package 'MvvmLightLibs 4.4.32.1'. You are trying to
install this package into a project that targets
'portable-net45+win+MonoAndroid10+MonoTouch10', 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.
When I try to install in Xamarin Studio.
Can I assume that I need the latest version of NuGet and the version 2.8.1 is not new enough in XS?
Does MVVMLight support Xamarin Studio? Does anyone know a workaround, I am currently on Indie license and would love to progress with this on a Forms based prototype.
Looking at the MvvmLightLibs 4.4.32.1 NuGet package it does not have any Portable Class Libraries (PCLs) so you will not be able to install it into a PCL project.
Take a look at the Portable.MvvmLightLibs NuGet package instead. That package has a PCL assembly and you should be able to install it into the Xamarin.Forms PCL project.

Resources