xamarin / GoogleApisForiOSComponents

MIT License
225 stars 161 forks source link

Firebase.CloudMessaging Failed to resolve on Windows #568

Open Ahmadpashaquarterpi opened 2 years ago

Ahmadpashaquarterpi commented 2 years ago

I installed Firebase cloud messaging nuget on mac, where it worked fine and the namespaces were being resolved, but then I opened the same project on Visual Studio 2022 Preview on windows, but I am getting following error when I try to restore the nuget packages.

Error occurred while restoring NuGet packages: Could not find a part of the path 'C:\Users\RBTG.nuget\packages\xamarin.firebase.ios.installations\8.10.0.1\lib\net6.0-ios15.4\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_i386_x86_64-simulator\FirebaseInstallations.framework\Headers\FirebaseInstallations-umbrella.h'.

maonaoda commented 2 years ago

Same error bug was xamarin.firebase.ios.remoteconfig

maonaoda commented 2 years ago

I ended up having to roll back to 8.10.0

justinimel commented 2 years ago

Same issue

Ahmadpashaquarterpi commented 2 years ago

@maonaoda thanks, I will try try version 8.10.0

dunlavy commented 2 years ago

Same. Seems to be a botched Nuget package? I'm missing header files. image

'C:....nuget\packages\xamarin.firebase.ios.core\8.10.0.1\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_i386_x86_64-simulator\GoogleUtilitiesComponents.framework\Headers\GoogleUtilitiesComponents-umbrella.h'.

robheffo79 commented 2 years ago

Same issue. Missing FirebaseInstallations-umbrella.h header

sstahurski commented 2 years ago

Got the same issue....trying 8.10.0

wagenheimer commented 2 years ago

Same error here.

Diyari-Kurdi commented 1 year ago

Same

kyakhta commented 1 year ago

I ended up adding nuget.config into solution folder with this content -

<add key="globalPackagesFolder" value="c:\temp" />

It fixed the issue, where path to nuget component was too long for windows to handle.

wowsense commented 1 year ago

Same

AlleSchonWeg commented 1 year ago

The problem is nuget package manager and the limited path length. Old problem. As a workaround set a environment variable: NUGET_PACKAGES with value c:\nuget and restart Visual Studio.

orwo1 commented 1 year ago

We encountered this build error on Windows as well, on version: 8.10.0.3. Is there any official update on this build error? Is a fix planned? Does this affect also online Azure builds as well?

evgenyvalavin commented 1 year ago

Same issue

Emeka-MSFT commented 1 year ago

Problem: I'm not sure what Firebase.CloudMessaging is; but I think that the issue has nothing to do with that NuGet package. The issue is very likely a long/max-path problem.

Verification: Open PowerShell in Windows, and run the following:

'C:\Users\RBTG.nuget\packages\xamarin.firebase.ios.installations\8.10.0.1\lib\net6.0-ios15.4\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_i386_x86_64-simulator\FirebaseInstallations.framework\Headers\FirebaseInstallations-umbrella.h'.Length;

NOTE: The results is ~263, while max-path is 260; therefore, it's at least 3 characters too long.

Solution:

Workaround:

antiGithub commented 1 year ago

same issue with 8.10.0.[1-3] but works with 8.10.0

huy-buidoanquang commented 11 months ago

same issue with 8.10.0.[1-3] but works with 8.10.0

I also faced this problem, but now I am using .net7-ios, it doesn't accept 8.10.0

I spent a lot of time but still can't solve this problem

Kelvyn14 commented 11 months ago

The problem is nuget package manager and the limited path length. Old problem. As a workaround set a environment variable: NUGET_PACKAGES with value c:\nuget and restart Visual Studio.

This option was the solution for my case. Thanks!

IeuanWalker commented 9 months ago

639

Juansero29 commented 8 months ago

I ended up adding nuget.config into solution folder with this content -

<add key="globalPackagesFolder" value="c:\temp" />

It fixed the issue, where path to nuget component was too long for windows to handle.

This definitely helped! Thanks

nine-2-five commented 7 months ago

Setting NUGET_PACKAGES env variable to C:\nuget helped with the FirebaseInstallations-umbrella.h, but it only went to this file and then broke again, and this file is 266 chars in length so no way to fit under 260 chars limit:

'c:\nuget\xamarin.firebase.ios.cloudfirestore\8.10.0.3\lib\xamarinios10\Firebase.CloudFirestore.resources\grpcpp.xcframework\ios-arm64_x86_64-simulator\grpcpp.framework\PrivateHeaders\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.h'.

Has anyone tried LongPathsEnabled registry setting?