Forum Visual Studio
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.

unable to add google-service.json to project

KimJensenKimJensen USMember ✭✭

Using Visual Studio 2017 Pro.
I'm trying to create the project "Remote Notifications with Firebase Cloud Messaging" found in the Xamarin Android Application/ Fundamentals/ Notifications. It say to add the google-service.json to the project folder. I add it in the Projects/FCMClient folder. Then it says: Add google-services.json to the app project (click Show All Files in the Solution Explorer, right click google-services.json, then select Include in Project).
I right click the google-services.json in the Solution Explorer, but I do not get an option that says Include in Project. I have add, but it only gives me new file, new item or new folder.
I'm stuck, thanks for any help.


  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    Can you add a screenshot showing what you are describing? Is the file physically present in the project folder?

  • KimJensenKimJensen USMember ✭✭

    I was able to add it by selecting Project and Add Existing Item from the menu.

    As you can see there is no option if I right click the file name in the Solution Explore.
    I was not able to get the FCM to work. I get a token but it is not registered and when I add the code to see if the json was implemented I just get a 6 digit number.

  • terzyterzy Member ✭✭
    edited November 2018

    I Realy need you help with this.
    I have followed a step by step

    And it say

    • Open context menu on google-services.json file.
    • Select GoogleServicesJson in Build Action.

    but im using Windows, dont know if its why but i cant follow the step by step for it becouse it dosent exists.
    the Build Action

    How did you solve this. Please help im really stuck

    Iv heard something about a nuget that need to be installed
    but cant get it to work


    Xamarin.GooglePlayServices.Basement 42.1001.0
    Note that all of the Xamarin.GooglePlayServices and Xamarin.Firebase packages show up with yellow caution symbols under project References.

    Cant find more then the basement in the reference in the android
    but in the Cross project i get this when i install
    Severity Code Description Project File Line Suppression State
    Error NU1202 Package Crosslight.Xamarin.Android.Support.Annotations 25.3.1 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Crosslight.Xamarin.Android.Support.Annotations 25.3.1 supports: monoandroid70 (MonoAndroid,Version=v7.0) *.csproj 1

  • GerryHGerryH USMember ✭✭✭

    terzy, any progress?

    I get the "not compatible" problem if I try to add google play services to my shared library. My project is a shared library, an Android app and an iOS app. That library should only be included in the Android app.

  • kasunwanniarachchikasunwanniarachchi Member ✭✭
    edited July 2019
    1. Copy the google-services.json to your solution Droid folder
    2. Go to vs solution explorer and right click on Droid project -> Add -> Existing Item (it will added to the solution)
    3. Then Right click on google-services.json and go to properties
    4. In the Properties pane, set the Build Action to GoogleServicesJson
  • ExoskeletorExoskeletor Member ✭✭✭

    Does anybody know why no longer we see a Build Action in properties?

Sign In or Register to comment.