-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS 2022 Maui is does not give the option for the GoogleServiceJson build action #14486
Comments
Thanks for the issue report @philm001! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS. If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.
|
@philm001: you mention that you "downloaded" Part of the problem may be that
Which of these packages did you add? The one you need to add is Xamarin.GooglePlayServices.Basement, which contains a <ItemGroup>
<AvailableItemName Include="GoogleServicesJson" />
</ItemGroup> which is what Visual Studio uses to populate the Build action options. When I use Visual Studio 17.5.4, create a new .NET Android project, and add the |
Hi @philm001. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
So this here is my current NuGet packages that I have added. I downloaded them through the NuGet Package manager
|
I continue seeing this issue targeting |
Targeting I'm adding
and it does seem to be initializing play services now, but neither the |
I had the same problem and had to delete my project clone it again install Xamarin.GooglePlayServices.Base and then I was able to see the GoogleServiceJson build action. Working with VS22 17.4.7 |
I actually got mine to work somehow. I forgot what I did but just want to confirm that adding that specific item group, everything is working for you now? |
Even though you might not see it in Visual Studio, if you install the |
@philm001 Yes, I ended up just editing the .csproj file to set the build action. |
Description
I downloaded the following nuget packages:
Firebase.common
Firebase.Messaging
GoogleplayServices.Base
GoogleplayServices.Basement
GoogleplayServices.Tasks
I have restarted VS 2022 multiple times. When I import the google-services.json file under the Android platform folder and when I go to Properties->Build Action. There is no option for GoogleServicesJson.
Steps to Reproduce
See above
Link to public reproduction project repository
n/a
Version with bug
6.0.312
Last version that worked well
6.0.312
Affected platforms
Android
Affected platform versions
Latest version of Android
Did you find any workaround?
A workaround has been discovered:
See this link here:
https://developercommunity.visualstudio.com/t/googleservicesjson-build-action-is-not-available/294192?viewtype=solutions
Here is the description of the work around:
Unfortunately, sometimes including the Xamarin.GooglePlayservices.Basement Nuget Package, cleaning, and restarting Visual Studio doesn't result in the necessary update to the projects csproj file. In this case its easiest to update the csproj file manually in a text editor (obviously after having tried the above!):
replacing "YOUR_PROJECT_PATH\packages\Xamarin.GooglePlayServices.Basement.60.1142.1\build\MonoAndroid80" with the correct relative path to the location of the package within your solution. Take a look at other import statements in csproj to get an idea of the correct relative path and verify the location with File Explorer (in case the dlls are stored under a different project in your solution).
Note that this comment is from 2019. So the version numbers will be higher. But the idea is the same. In the project file, you need to manually point to the targets file that is inside of the Xamarin.GooglePlayServices.Basement package in order to get this to work.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: