MAUI Firebase iOS not building

RR 5 Reputation points
2023-11-30T14:50:44.0666667+00:00

I am trying to implement and compile with Visual Studio 2022 in Windows 11 with push notifications in my MAUI application for both Android and iOS. I receive the following error when building: "Unable to copy file "D:\p\xamarin.firebase.ios.installations\8.10.0.3\lib\net6.0-ios15.4\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simulator\FirebaseInstallations.framework\Headers\FIRInstallationsErrors.h" to "bin\Debug\net8.0-ios\iossimulator-x64\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simulator\FirebaseInstallations.framework\Headers\FIRInstallationsErrors.h". Could not find a part of the path 'bin\Debug\net8.0-ios\iossimulator-x64\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simulator\FirebaseInstallations.framework\Headers\FIRInstallationsErrors.h'"

I have already a custom Nuget configuration with a minimal path (D:\p), enabled long paths in the registry and in the 'Local Group Policy Editor'.

Tried to implement Plugin.Firebase --> path too long Tried to implement Plugin.Firebase.CloudMessaging and Plugin.Firebase.Core --> can't build without errors because the path is too long

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,692 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,971 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,409 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 36,951 Reputation points Microsoft Vendor
    2023-12-01T07:43:14.99+00:00

    Hello,

    To enable long paths in Windows, in addition to changing the registry, you need to add configuration items to the program.

    Please refer to Maximum Path Length Limitation for more details.

    The application manifest must also include the longPathAware element.

    <application xmlns="urn:schemas-microsoft-com:asm.v3">
        <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
            <ws2:longPathAware>true</ws2:longPathAware>
        </windowsSettings>
    </application>
    

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. RR 5 Reputation points
    2023-12-13T16:17:46.0933333+00:00

    I have solved it by changing the path of bin, obj and nuget packages with D:\b, D:\o, D:\p and now I have installed Plugin.Firebase.CloudMessaging and Plugin.Firebase.Core and can compile

    0 comments No comments