Can't set Build Action to GoogleServiceJson
The GoogleServicesJson
build type comes from the Xamarin.GooglePlayServices.Basement.targets
.
If your project does not have Xamarin.GooglePlayServices.Basement
installed via one of its dependents, usually Xamarin.GooglePlayServices.Gcm
or Xamarin.Firebase.Messaging
if we are talking about messaging, then you will not have that build action available.
After adding a package that installs Basement, or manually adding it yourself, your .csproj
will contain an import for Xamarin.GooglePlayServices.Basement.targets
and GoogleServicesJson
will be available as a build type:
.csproj
import example:
<Import Project="..\packages\Xamarin.GooglePlayServices.Basement.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Basement.targets" Condition="Exists('..\packages\Xamarin.GooglePlayServices.Basement.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Basement.targets')" />
Even after installing "Xamarin.GooglePlayServices.Basement" GoogleServiceJson option was not showing. Surprisingly but when i quit Xamarin studio and opened it again it starts displaying.
1-Download first these Packages:
Xamarin.Firebase.Common
Xamarin.Firebase.Config
Xamarin.Firebase.Iid
Xamarin.GooglePlayServices.Base
Xamarin.GooglePlayServices.Basement
Xamarin.GooglePlayServices.Tasks
2-then restart and rebuild
3-from google-services.json --> Properties --> build Action: GoogleServicesJson