GoogleServicesJson BuildAction missing #25

Closed
tallkid10 opened this Issue Sep 8, 2016 · 3 comments

Projects

None yet

3 participants

@tallkid10

Xamarin.Android Version ( 6.0):

Operating System & Version (Windows 10 VisualStudio 2015)

Google Play Services Version (9.4.0)

Describe your Issue:

If I use the FirebaseMessaging quickstart sample I see GoogleServicesJson BuildAction is available when I selecet the google-services.json file in the project.

However, according to @Redth 's comment in this thread I just need to add the nuget package for Xamarin.GoogleServices.Basement and it should be available. I have tried this in new projects but I have been unsuccesful. Is there something else I need to do?

Steps to Reproduce (with link to sample solution if possible):

-Create a new project
-Add your google-services.json to the project
-Add the nuget package for Xamarin.GoogleServices.Basement
-Click on google-services.json and go to properties. The buildaction is not available and if you try to enter it manually an error appears saying "Property value is not valid"

@Redth
Contributor
Redth commented Sep 8, 2016

The build actions can be a bit finicky right after you install a nuget package. Here are a few things to try:

  1. Try cleaning/rebuilding your project
  2. Try restarting Visual Studio
  3. Make sure that your .csproj has an entry which includes Xamarin.GooglePlayServices.Basement.targets
@tallkid10

Rebuilding solved the problem, thanks again @Redth !

@tallkid10 tallkid10 closed this Sep 8, 2016
@bmseqat
bmseqat commented Dec 22, 2016 edited

Easy way is to modify .csproj file in TextEdit by adding the following line
<ItemGroup> <GoogleServicesJson Include="google-services.json" /> </ItemGroup>
PS: I tried to clean/rebuild project or restart Xamarin IDE many times, but the results are not consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment