xamarin / XamarinComponents

Plugins for Xamarin
MIT License
1.99k stars 695 forks source link

Missing reference for Google.Maps #787

Open SubhanAli94 opened 4 years ago

SubhanAli94 commented 4 years ago

I am facing an issue while building Xamarin.iOS project in Xamarin.Forms project.

Current Packages: I added latest versions of Xamarin.Forms.GoogleMaps, Xamarin.Google.iOS.Maps and Xamarin.Build.Downloads. My XF packages have same versions in all projects.

Error while Building: Xamarin.Build.Download.targets(3,3): Error: Did not find reference matching RestoreAssemblyResources AssemblyName metadata 'Google.Maps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

What I tried? 1- Delete bin/obj directories, reopening and rebuilding project 2- Tried downgrading package versions 3- Targeted iOS Deployment greater than 9

jhf commented 4 years ago

We have the same issue. For us the problem was solved by downgrading Xamarin.Build.Download to version 0.4.11 and then

ashleypringle commented 4 years ago

We also ran into this issue after updating Xamarin.Build.Download to 0.8.0, as well as: Xamarin.Firebase.iOS.ABTesting to 3.0.0.1 Xamarin.Firebase.iOS.Analytics to 6.0.4.1 Xamarin.Firebase.iOS.Auth to 6.2.1.2 Xamarin.Firebase.iOS.Core to 6.1.0.1 Xamarin.Firebase.iOS.InstanceID to 4.2.1.1 Xamarin.Firebase.iOS.RemoteConfig to 4.2.1.1 Xamarin.Google.iOS.Core to 3.1.0.2 Xamarin.Google.iOS.SignIn to 5.0.1.1

We got two different errors, seemingly randomly: Error: Did not find reference matching RestoreAssemblyResources AssemblyName and Error: Sharing violation on path Xamarin.Google.iOS.Sign In.5.0.1.1 I unfortunately did not copy the entirety of the errors, and now can't replicate the issue to get the errors again.

Downgrading to Xamarin.Build.Download to 0.4.11 fixed the issue. The strange thing is, after then updating it back to 0.8.0, cleaning all and rebuilding, the errors have disappeared. I'll have to keep an eye on it and see if the issue crops up again.

azuken commented 4 years ago

@ashleypringle I think it's because your Xamarin.Google.iOS.Sign nuget package dependency is already and correctly downloaded. if you clean your local nuget packages and try to rebuild I think errors will appear again.

ashleypringle commented 4 years ago

@azuken Yes you're right, today it's giving build errors again, although now they say: The "AllowUnsecureUrls" parameter is not supported by the "XamarinDownloadArchives" task. Verify the parameter exists on the task, and it is a settable public instance property. (MSB4064) And Error MSB4063: The "XamarinDownloadArchives" task could not be initialized with its input parameters. (MSB4063)

EDIT: Downgrading to Xamarin.Build.Download 0.4.11 fixed it again.

jmichas commented 4 years ago

This is a bit ridiculous. I tried loading a project that builds and runs perfectly fine on VS 2019 on windows with Xamarin.Build.Download 0.8.0 but when cloning it and running it on VS Mac (so I can run UITests) it won't build and gives me the same errors described in the comment above. Am I supposed to downgrade?

chrisfoulds commented 4 years ago

Sigh another stupid problem, lets add more and more and more stuff to Xamarin - who cares if things don't work at a fundamental level

SotoiGhost commented 4 years ago

Hi guys! A very sorry for the inconveniences that this cause. We have released Xamarin.Build.Download v0.9.0 that has a potential fix for errors below:

Error: Did not find reference matching RestoreAssemblyResources AssemblyName
Error: Sharing violation on path Foo In x.x.x.x

Also, we have released an update for Google Maps for iOS (v3.7.0).

Please, update and let us know your result.

Best!

maikhanns commented 4 years ago

Update works for me in Azure DevOps Pipeline Build. Before we had this Error with Google Maps for iOS (v3.5.0) and Xamarin.Build.Download v0.8.0

Update: but does not build locally same issue as described here https://github.com/xamarin/GoogleApisForiOSComponents/issues/351

Could not load file or assembly 'Microsoft.Win32.Registry, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

jhf commented 4 years ago

I see there is a new release v0.10.0 of Xamarin.Build.Download [1] that one may test to see if the issue is resolved. [1] https://github.com/xamarin/GoogleApisForiOSComponents/issues/351#issuecomment-595887824

jhf commented 4 years ago

The version v0.10.0 of Xamarin.Build.Download resolved the issue for us. I think this ticket can be closed.