We are working on a new Xamarin project that would include ArcGIS components.
We followed Microsoft recommendation saying that it is better to use the Xamarin model with Portable Library (PCL), not shared components.
But I do not see how to integrate ArcGIS NuGet package in such a project. I get every time an error saying that I try to to install a package that target .NETPortable but that the package is not compatible with such target...
Please tell me what is the solution...
Probably a version of this Runtime SDK should be supplied supporting PCL ?
There are technical aspects that hinder Esri from providing the Runtime in a PCL-compatible way. Therefore, only shared projects are supported (at least that's what I've heard from them).
Is PCL support something that we can expect in a future release?
FWIW, this is the message I see when I try to install Esri.ArcGISRuntime.Xamarin.Forms for a Portable Class Library project:
Could not install package 'Esri.ArcGISRuntime.Xamarin.Forms 100.0.0'. 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.
We are actively researching supporting .NET Standard 2.0+ in the future, and this _might_ just be possible now. However it would require some breaking changes and dropping support for older platforms, but I'm hoping we'll be able to go there, but not something we can promise at this point, nor give a timeline for.
So if we do this it would be out in the future. Until then shared projects is the way to go for Xamarin + ArcGIS Runtime.
This made me /sad to learn that PCL's aren't supported. I found this out the hard way today. The whole point of Xamarin forms is to have one code base delivered to multiple platforms. But by limiting us to Shared libraries (instead of portable libraries), we can't even add a service reference or a nuget package to the shared library...thus totally limiting us to what we can do. PCL is the way of the future Xamarin / Crosss platform applications.
The whole point of Xamarin forms is to have one code base delivered to multiple platforms
A shared project still gives you one code base - it just doesn't give you one binary
we can't even add a service reference or a nuget package to the shared library
You would add the reference to each project, but still write the code in the shared library