Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

HELP: Xamarin Google Play Services from NuGet requires non existent Xamarin Forms version !?

AndrewzAndrewz USMember ✭✭
edited February 2017 in Xamarin.Forms

I created a Xamarin Forms XAML Shared app in VS2015.
I updated to latest stable XF

I'm trying to install Xamarin Google Play Services by NuGet but it says it needs to upgrade Xamarin Forms to v2.3.3.193. But there is no such version.

How can I use Google Play Services with Xamarin Forms?
I'm confused...

If I hit OK, then Project Explorer shows yellow icons for some references....


  • mattwardmattward GBMember Xamurai
    edited February 2017

    Which Xamarin Google Play Services NuGet package did you install? Looking at the list it looks like Xamarin.GooglePlayServices.Location. The Xamarin.Forms NuGet package exists but it has been unlisted for some reason:

    If I install Xamarin.GooglePlayServices.Location I also see Xamarin.Forms installed.

    I cannot see any GooglePlay or Android NuGet package that depends on Xamarin.Forms. So it looks like NuGet has resolved this as a dependency since Xamarin.Forms supports the later versions of the Xamarin.Android NuGet packages, versions above 23.3.0, whilst Xamarin.Forms only supports 23.3.0.

    It is also interesting that NuGet uses an unlisted NuGet package when resolving dependency. I would guess that it is just looking for the latest stable version, unlisted or not.

  • AndrewzAndrewz USMember ✭✭
    edited February 2017

    @mattward Thank you for reply.
    I'm just trying to install latest Xamarin.GooglePlayServices.Location from NuGet in Visual Studio 2013.

    If I understand correctly, it looks like Xamarin Forms continues to be desync'ed from Xamarin Google Play Services in terms of which Android version is referenced. Which creates the problem I have I think.

    The fact that there is an unlisted Xamarin.Forms it's even more confusing. Until now I didn't even realize that the NuGet package manager in Visual Studio finds & uses unlisted versions on NuGet.... Thank you for making me aware of that.

    So what is the solution?

    I'm just following a normal flow where you create a Xamarin Forms app, then you add other Xamarin libraries, in this case Xamarin Google Play Services. And you don't want the pre-release versions on NuGet unless there's a good reason. Shouldn't this just work?

  • mattwardmattward GBMember Xamurai

    Xamarin.Forms and Xamarin Google Play Services both depend on Xamarin.Android NuGet packages. The older NuGet packages were tied to specific versions of the Xamarin.Android NuGet packages which made it difficult to upgrade other parts. The newer versions have a more relaxed version requirement.

    The only solution, which is more of a workaround, is to use an older Xamarin Google Play Services that supports the same Xamarin.Android NuGet packages as the Xamarin.Forms NuGet package you have installed. Or wait until a new stable release of Xamarin.Forms is pushed to

    Xamarin.Forms is not a pre-release NuGet package it has just been unlisted for some reason. The NuGet behaviour is reasonable if a bit unexpected. If that unlisted package was not there the install would fail since the Xamarin.Forms NuGet package is tied to a specific version of the Xamarin.Android NuGet packages. Only the Xamarin.Forms NuGet package works with later versions of the Xamarin.Android NuGet packages.

  • AndrewzAndrewz USMember ✭✭
    edited February 2017

    It would be much better if somehow NuGet failed to install Google Play Services.
    I'm in a common scenario where I create an app and I don't want to use any unreleased / unlisted packages, I only want stable/released.

    I don't understand why Xamarin Forms team decided to leave Xamarin.Forms It's very confusing having both unreleased and unlisted versions. I don't even undertsand what version is, I searched for exact string on forum and I have found just 2 other threads but discussing something else.

    I know you're NuGet guy, but do you know where can I find information on what has been changed on Xamarin Google Play services?
    So I can decide whether I can use an earlier version.
    The page on component store nor on Nuget does not give any info on what has been changed.

  • DirkWilhelmDirkWilhelm USMember ✭✭✭✭✭

    @Andrewz take a look here for th Release Notes of

  • mattwardmattward GBMember Xamurai

    There is some information on the NuGet pages. Not an extensive list of changes such as are listed with Xamarin.Forms. Mostly it seems to be which version of the Google Play Services that are supported with that particular NuGet package, at least with the more recent releases.

  • AndrewzAndrewz USMember ✭✭

    I still don't understand why even with Xamarin Forms, Visual Studio shows yellow icons and warnings:

  • AndrewzAndrewz USMember ✭✭

    Even the previous version of Xamarin Google Play Services Location v32.961.0 also asks for Xamarin Forms
    I'd have to go down to v29.0.0.2 so that Xamarin Forms is not required, but this is too old....

    What do you recommend? I could I guess go with Xamarin Forms but I don't like those warnings...

  • AndrewzAndrewz USMember ✭✭
    edited February 2017

    What is the reason of those warnings anyway? I can't figure out. The reference is there, on the right path.
    Is it maybe because these assemblies try to reference a different version of Android? I'm confused...

  • mattwardmattward GBMember Xamurai
    edited February 2017

    It does not seem to be related to Xamarin.Forms. I can reproduce the warnings on the references in Visual Studio with an Android project by just installing the Xamarin.GooglePlay.Location NuGet package. The project still seems to compile.

    NuGet does have some strange behaviour with that unlisted NuGet package. Xamarin Studio allows you to update to it. Visual Studio will update to it if you use the Package Manager console window, but from the GUI.

  • AndrewzAndrewz USMember ✭✭

    @mattward Aren't those warnings because Xamarin Forms is not compatible with the version of Android Support libraries updated by latest Google Play Services?
    In other words, maybe not even the unlisted Xamarin Forms is compatible with that version of Android Support libraries required by the Google Play Services?

  • mattwardmattward GBMember Xamurai

    I was testing just the Xamarin.Android NuGet packages with the Google Play Services NuGet packages and can reproduce the same problem. So I do not think it is a problem specific to Xamarin.Forms. Just in the process of updating the Xamarin extension in Visual Studio to see if it makes any difference.

  • AndrewzAndrewz USMember ✭✭

    Any news on this?
    Basically I can't use latest stable Xamarin Google Play Services.... I'd have to use a very old(many months back) stable version instead.

    Also, since this issue doesn't actually have to do with Xamarin Forms projects, I'm pretty confused, in which scenario does it actually work?

  • AndrewzAndrewz USMember ✭✭
    edited February 2017

    @JamesMontemagno @DavidOrtinau can you please help on this?

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    @Andrewz said:
    @DavidOrtinau can you please help on this?

    Xamarin.Forms and both should allow you to use any Android API version so long as you're targeting framework 7.0 or greater. is unlisted so we can stage a stable release for integration with our tools. It seems there some problem in NuGet or XS making it visible to you. I think @mattward is on that. Sorry for the confusion.

    Other users are reporting success using Google Play Services with these Xamarin.Forms versions. I'll confirm the details right now and post back shortly.

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    I setup a new project and was able to build successfully with with the latest Xamarin.GooglePlayServices.Location. Am I misunderstanding something here? I wonder if NuGet is supremely confused on your system.

    This is what I have installed:

    <?xml version="1.0" encoding="utf-8"?>
      <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.Compat" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.Core.UI" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.Core.Utils" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.Design" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.Fragment" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.Media.Compat" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.Transition" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.v4" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.v7.AppCompat" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.v7.CardView" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.v7.MediaRouter" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.v7.Palette" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.v7.RecyclerView" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Android.Support.Vector.Drawable" version="25.1.1" targetFramework="monoandroid70" />
      <package id="Xamarin.Build.Download" version="0.4.2" targetFramework="monoandroid70" />
      <package id="Xamarin.Forms" version="" targetFramework="monoandroid70" />
      <package id="Xamarin.GooglePlayServices.Base" version="42.1001.0" targetFramework="monoandroid70" />
      <package id="Xamarin.GooglePlayServices.Basement" version="42.1001.0" targetFramework="monoandroid70" />
      <package id="Xamarin.GooglePlayServices.Location" version="42.1001.0" targetFramework="monoandroid70" />
      <package id="Xamarin.GooglePlayServices.Tasks" version="42.1001.0" targetFramework="monoandroid70" />
  • @DavidOrtinau said: is unlisted so we can stage a stable release for integration with our tools. It seems there some problem in NuGet or XS making it visible to you. I think @mattward is on that. Sorry for the confusion.

    There is no problem with Nuget, everything is worked as intended:

    That being said, is there any detriment to using that unlisted package?

  • AndrewzAndrewz USMember ✭✭
    edited February 2017

    @DavidOrtinau You said you built successfully, but you don't have any yellow warnings icons on some of the references in the Android project?

    The warnings are NOT visible right after installing packages. After installing packages NuGet asks you restart Visual Studio. After restarting and reopening the project, I could see several warnings that some of the references could not be loaded, even if they are obviously there on disk and paths are right.

    As discussed above, this has nothing to do with Xamarin Forms, @mattward also reproduced this on an Xamarin Android project without Xamarin Forms.

  • mattwardmattward GBMember Xamurai

    @Andrewz - The problem seems to have something to do with the imported .targets files that the various Xamarin.Android NuGet packages adds. If you comment out the Xamarin.Build.targets import at the end of the project the warnings in Visual Studio 2015 disappear. Similarly if you leave the Xamarin.Build import uncommented and then comment out the imported .targets added by the Xamarin.Android NuGet packages then the warnings disappear. The build still works. It is not obvious what Visual Studio 2015 does not like about the .targets files.

  • AndrewzAndrewz USMember ✭✭

    Thank you @mattward
    Two things:
    1. Is this a known issue for Xamarin, something which is currently under investigation/fixing?
    2. It's not clear to me whether it's safe to ignore all those warnings or not? If it's not safe, should I comment the Xamarin.Build.targets import as you suggested?

  • mattwardmattward GBMember Xamurai

    @Andrewz - I have reported it to the owners of the Xamarin.Android NuGet packages. They are currently investigating.

    If your project builds without the Xamarin.Build.targets added then it should be OK. Looking at that NuGet package it is used to download the various Android .zips into %LocalAppData%\XamarinBuildDownloadCache which are needed at build time.

  • AndrewzAndrewz USMember ✭✭

    This issue persists on the latest released Xamarin version....

  • FlorianDayanFlorianDayan USMember ✭✭

    @Andrewz I'm facing exactly the same issue with the yellow warnings appearing after restarting VS, is there something new about it ?

  • FlorianDayanFlorianDayan USMember ✭✭

    @Andrewz @mattward I was able to fix the issue thanks to this comment :

    You just have to update Xamarin.Build.Download from 0.4.2 to 0.4.3 (last version released on March 27)

Sign In or Register to comment.