mistrypragnesh40 / PushNotificationDemoMAUI

33 stars 10 forks source link

Installing Xamarin.Firebase.iOS.CloudMessaging Package on Windows #3

Closed canperk closed 1 year ago

canperk commented 1 year ago

I am trying to add package to csproj as floowing line but VS cannot install its dependencies.

<PackageReference Include="Xamarin.Firebase.iOS.CloudMessaging" Version="8.10.0.3" />

However, if I use Nuget Package Manager to add same package it gives eeror like

Could not find a part of the path '.nuget\packages\xamarin.firebase.ios.core\8.10.0.3\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h'.

Have you ever faced with that kind of issue?

mistrypragnesh40 commented 1 year ago

Hi, No I didn't faced such error. Although I will check and let you know.

cwilde123 commented 1 year ago

I have the same problem although 8.10.0 works

cwilde123 commented 1 year ago

@canperk @mistrypragnesh40 What I did to get it to work is that I installed the package manually through powershell outside of VS 2022. I closed VS and then opened powershell and navigated to my solution/project where the project csproj is and ran:

dotnet add package Xamarin.Firebase.iOS.CloudMessaging --version 8.10.0.3

The reason the error comes up is a bit misleading, windows only supports 240 character file paths. I tried enabling long file paths enabled in registry and group policy but it didn't work. However adding through powershell worked

cwilde123 commented 1 year ago

You will need to also edit csproj as powershell seems to set targetframewrok if its maccatalyst for cloud messaging nuget. Change it to iOS target framework instead

mistrypragnesh40 commented 1 year ago

image I Also tried to enable long file path in registry it's not worked for me, so I tried to save NuGet Packages in outer directory.