maui icon indicating copy to clipboard operation
maui copied to clipboard

Maui - some nugets do not work as path is too long "Could not find a part of the path"

Open Zack-G-I-T opened this issue 2 years ago • 51 comments

Description

Using the Xamarin.Firebase.iOS.CloudMessaging nuget in .NET Maui. Android works fine, but in iOS we get this error. I believe it is because the file path is too long - however I have set the system settings to enable long paths and still get this exception. I am using Windows 10 if that is relevant.

**An error occurred while trying to deploy the app 'SamplePush.app'. Details: Could not find a part of the path

'C:\Users\username\AppData\Local\MyTempFiles\Xamarin\HotRestart\Signing\SamplePush.app\out\Payload\SamplePush.app\SamplePush.content\Firebase.CloudMessaging.resources\FirebaseMessaging.xcframework\ios-arm64\FirebaseMessaging.framework\Headers\FirebaseMessaging-umbrella.h'.**

I changed my temp file location to be shorter C:\tmp but still get the following:

**An error occurred while trying to deploy the app 'SamplePush.app'. Details: Could not find a part of the path

'C:\Tmp\Xamarin\HotRestart\Signing\SamplePush.app\out\Payload\SamplePush.app\SamplePush.content\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_x86_64-simulator\GoogleUtilitiesComponents.framework\Headers\GoogleUtilitiesComponents-umbrella.h'**

Steps to Reproduce

  1. Download Xamarin.Firebase.iOS.CloudMessaging nuget in a new maui app.
  2. Try and debug in ios and see exception.

Link to public reproduction project repository

No response

Version with bug

7.0.92

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

An error occurred while trying to deploy the app 'SamplePush.app'. Details: Could not find a part of the path

'C:\Users\username\AppData\Local\MyTempFiles\Xamarin\HotRestart\Signing\SamplePush.app\out\Payload\SamplePush.app\SamplePush.content\Firebase.CloudMessaging.resources\FirebaseMessaging.xcframework\ios-arm64\FirebaseMessaging.framework\Headers\FirebaseMessaging-umbrella.h'.

Zack-G-I-T avatar Oct 04 '23 14:10 Zack-G-I-T

Does enabling long paths help here at all?

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later

/cc @emaf @mauroa

jonathanpeppers avatar Oct 11 '23 14:10 jonathanpeppers

Created AzDO bug since it belongs to the Platform Tools team: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1899665

mauroa avatar Oct 11 '23 15:10 mauroa

Note, long file paths doesn't work in windows 11 at all, both the registry setting and group policy option doesn't work with long paths anymore so this long paths issue is a pretty major regression. Not being able to use Firebase for instance for push notifications is crippling our ability to test our apps.

radderz avatar Oct 16 '23 20:10 radderz

Note, long file paths doesn't work in windows 11 at all, both the registry setting and group policy option doesn't work with long paths anymore

We should file a bug with Windows, if that is the case, this is unrelated to MAUI.

As to the error above:

Could not find a part of the path

'C:\Users\username\AppData\Local\MyTempFiles\Xamarin\HotRestart\Signing\SamplePush.app\out\Payload\SamplePush.app\SamplePush.content\Firebase.CloudMessaging.resources\FirebaseMessaging.xcframework\ios-arm64\FirebaseMessaging.framework\Headers\FirebaseMessaging-umbrella.h'.

Do you know what changed? When it worked, was the path just shorter?

jonathanpeppers avatar Oct 16 '23 21:10 jonathanpeppers

I imagine the path was shorter, any filename over 260 will fail in windows 11, when it was possible to get it working in window 10. I am not sure when this started failing but it's pretty painful after updating our devs all with new laptops running windows 11.

I put the note in here incase that was the issue and it looks like this filename is 271 in length so the long file names setting would need to be enabled to work for this to function. The issue comes from the nuget package download/unzip, which fails due to the long file names. Then the copying to the obj folder can have the same effect if that path ends up too long too.

I am unsure if @Zack-G-I-T is using windows 11 but if he is then I'd say that is the problem he is experiencing.

Edit: @Zack-G-I-T is using Windows 10. You should look up enabling long filenames in registry to allow file paths > 260 in length. After doing that you need to delete the package from your nuget cache as it is already there in a bad state and visual studio will not restore it for you.

radderz avatar Oct 16 '23 21:10 radderz

@radderz Hi, I am on Windows 10 and I tried enabling long file names in regedit and in group policy and i deleted my whole nuget cache but it didnt work. I ended up having to delete the "_CopyLocalBindingResources" tag from my Xamarin.Shared.Sdk.targets" for it to work.

Zack-G-I-T avatar Oct 17 '23 08:10 Zack-G-I-T

@radderz @Zack-G-I-T how are you installing the FireBase NuGet package? If it's by adding a PackageReference or using the Package Manager Console, I guess you are getting an error on installation or restore time, aren't you? I'm just trying to understand if that's the first error you are facing or if it's directly when building the MAUI app for iOS. That would help us to determine the best route for the issue. Thanks

mauroa avatar Oct 23 '23 19:10 mauroa

@mauroa it is when trying to build, it tries to copy the contents of the nuget to the obj folder for build, but the file doesn't exist as at nuget restore time since the initial zip extraction fails. It basically gives a cannot copy file error and the overall path is way too long.

image

I tried to change the nuget cache folder to have as short a path as possible but it still fails since it copies it to the obj folder of the project which has a longer path.

radderz avatar Oct 23 '23 19:10 radderz

@radderz thanks. That's correct, but it also fails when you install the package or restore it without building. The package installation in the cache folder is what it initially fails. The installation gets incomplete because of the path length issue. When I try to install the package, it shows this error:

Install-Package : Could not find a part of the path C:\Users\myuser\nuget\packages\xamarin.firebase.ios.installations\8.10.0.3\lib\xamarinios10\Firebase.Installations.resources\FirebaseInstallations.xcframework\ios-arm64_x86_64-simu lator\FirebaseInstallations.framework\Headers\FIRInstallationsAuthTokenResult.h.

In fact, If I go to that path and try to manually create that missing file, Windows truncates the file name because of the path policy.

I think this issue is indeed out of the scope of MAUI or tooling, as @jonathanpeppers suggested in a comment above.

mauroa avatar Oct 23 '23 19:10 mauroa

Yea it isn't a Maui problem, I'd say however that this is a very commonly used package within MAUI so it is going to be a big pain for a lot of devs using MAUI.

radderz avatar Oct 23 '23 19:10 radderz

@mauroa, Actually, I just tested using CMD prompt, long file paths is working fine with the registry setting. So the issue is actually with the application trying to access the long paths i.e. nuget and VS.

I.e. try this.

  1. enable long file paths
  2. go to a folder in terminal.
  3. mkdir fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
  4. cd fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
  5. repeat till the folder path is very long

You can create a path that exceeds the size limit of windows 260 chars. explorer doesn't support long file paths but the windows file system is working.

So I do think this is a tooling issue in nuget/VS build.

radderz avatar Oct 23 '23 19:10 radderz

Correct, cmd allows it. However, if you try to create a folder or a file in Windows with the UI (right click > New > Folder or right click > New > Text Document) in an already very long and exceeded path (created with cmd), you will see that Windows doesn't allow you to do that. So, we agree that the Windows file system allows it, the Windows explorer doesn't as well as VS/NuGet.

mauroa avatar Oct 23 '23 20:10 mauroa

Correct, cmd allows it. However, if you try to create a folder or a file in Windows with the UI (right click > New > Folder or right click > New > Text Document) in an already very long and exceeded path (created with cmd), you will see that Windows doesn't allow you to do that. So, we agree that the Windows file system allows it, the Windows explorer doesn't as well as VS/NuGet.

Yes but that's a choice Microsoft made for "compatibility". Windows explorer isn't used as part of nuget restore and build so that's not really relevent. Nuget, unzip/zip and VS should be able to use the longer file paths.

radderz avatar Oct 23 '23 20:10 radderz

Yes, I agree with you. What affects us is anything that touches the VS scope, however I was trying to picture the areas affected by this long path issue, independently of VS, just for context purposes.

mauroa avatar Oct 23 '23 20:10 mauroa

Did you find any workaround ? I got the same problem after update my visual studio and .net8

harima34 avatar Nov 16 '23 06:11 harima34

Did you find any workaround ? I got the same problem after update my visual studio and .net8

No there was no workaround, still can't build ios on .net 8 if using firebase push.

radderz avatar Nov 16 '23 07:11 radderz

  1. gpedit.msc, Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem, then enable the Enable Win32 long paths option
  2. Change msbuild.exe.config : <AppContextSwitchOverrides value="Switch.System.Security.Cryptography.UseLegacyFipsThrow=false;Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
  3. REBOOT

That actually worked to get around the long path build issues for me, temporarily at least, a couple weeks ago.

Now evidently there has been some update ... and that work-around no longer works, long path issue has returned.

Urghh.

Does anybody have Push Notifications working in MAUI - and an example that compiles, and please list the VS version, nugets, OS version, Firebase plugin version, etc. What is the magic working combination and any OS and msbuild settings?

And why in the world would msbuild default to short paths anyways, especially since max_path limit was removed back in RS1.

robertev-alchemy avatar Dec 07 '23 19:12 robertev-alchemy

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Dec 07 '23 19:12 ghost

This doesn't work for the firebase package as the filenames are far too long, so just shortening the package cache isn't enough.

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: SEONG-AHN LEE @.> Sent: Friday, December 8, 2023 9:47:27 PM To: dotnet/maui @.> Cc: Mark Radcliffe @.>; Mention @.> Subject: Re: [dotnet/maui] Maui - some nugets do not work as path is too long "Could not find a part of the path" (Issue #17828)

C: Create a folder "X" on drive root, copy all the files and folders underneath the solution folder, and build and deploy it.

— Reply to this email directly, view it on GitHubhttps://github.com/dotnet/maui/issues/17828#issuecomment-1846782469, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJD3T6SHUYVHGUKZ3WFDV3YILHZ7AVCNFSM6AAAAAA5SWEMSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBWG44DENBWHE. You are receiving this because you were mentioned.Message ID: @.***>

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

CAUTION: This correspondence is confidential and intended for the named recipient(s) only. If you are not the named recipient and receive this correspondence in error, you must not copy, distribute or take any action in reliance on it and you should delete it from your system and notify the sender immediately. Unless otherwise stated, any views or opinions expressed are solely those of the author and do not represent those of Blackhawk Tracking Systems Limited.

radderz avatar Dec 08 '23 09:12 radderz

https://github.com/xamarin/GoogleApisForiOSComponents/issues/639

IeuanWalker avatar Dec 15 '23 19:12 IeuanWalker

Has anyone got any workaround?

Atm seems impossible to build push notification using FCM

IeuanWalker avatar Dec 15 '23 19:12 IeuanWalker

As far as I know, simply enabling the Long Path in Group Policies is not sufficient. It also needs to be activated in the application manifests. However, for .Net apps, it is enabled by default.

For MsBuild.exe and Nuget.exe, Long Path is indeed enabled. However, when running Nuget and MsBuild through Visual Studio (VS), it doesn't work with long path names. As a workaround, one would need to run Nuget and MsBuild not through VS but through the command line interface (CLI).

It seems that Visual Studio (devenv.exe) restricts the use of long paths in its manifest. This leads to errors during the build process, as explained here: https://github.com/NuGet/Home/issues/3324#issuecomment-977960239

AlleSchonWeg avatar Dec 16 '23 13:12 AlleSchonWeg

I have the same problem with Xamarin.Firebase.iOS.Core... it is impossible to continue in these conditions..

GiuseppeGiacalone avatar Jan 02 '24 16:01 GiuseppeGiacalone

After struggling with this myself for multiple days and slogging through misleading errors, fiddly/brittle config and red herring warnings, I thought it best to give back a working solution to the community.

This repo contains a fairly minimal working .NET 8 project targeting iOS and Android with Firebase Cloud Messaging, Analytics and the relevant DevOps build pipelines to get them built and pushed into App Center.

https://github.com/coop-tim/maui-sample

Hoping this helps whilst the root issues are worked on.

coop-tim avatar Jan 11 '24 00:01 coop-tim

Do you know what changed? When it worked, was the path just shorter?

@jonathanpeppers what's changed is Apple's shift to XCFrameworks and how iOS.NET packs these libraries in NuGet.

Take, for example, the Xamarin.Firebase.iOS.Core package for v 8.10.0. This package was built for Xamarin only. The lib directory contained one file with the path xamarinios10/Firebase.Core.dll.

Compare that to the version built for .NET6+ (8.10.0.3). The lib folder packs the XCFrameworks directly. If you crack it open, you find file paths like:

net6-ios15.4/Firebase.Core.resources/GoogleUtilitiesComponents.xcframework/ios-arm64_x86_64-simulator/GoogleUtilitiesComponents.framework/Headers/GoogleUtilitiesComponents-umbrella.h

The verbosity of these long file paths is just part of the nature of how XCFrameworks are designed. Since these resources are no longer packed into a .DLL (like in the Xamarin times), Visual Studio chokes when restoring these packages and when attempting to archive an iOS app for release.

We should file a bug with Windows, if that is the case, this is unrelated to MAUI.

You're right. But let's set Windows 11 aside for a moment. On Windows 10, Visual Studio is still incapable of restoring these NuGet packages or archiving for deployment. So there is a problem with the standard MAUI toolchain (at least on Windows....) So, even if Windows 11 gets around to supporting long filepath support like Windows 10 did, it's very likely that Visual Studio will continue to be incompatible.

One final note. Regardless of 'which team' at Microsoft should bear responsibility for fixing this--it affects MAUI devs just the same. Expectations should be communicated and documentation should be updated to reflect the reality of the situation. If that means Microsoft's flagship IDE is no longer fundamentally capable of building or shipping MAUI apps on the iOS platform, then this should be stated plainly so tech leaders can plan accordingly.

AdamEssenmacher avatar Jan 18 '24 06:01 AdamEssenmacher

I have the same problem with Xamarin.Facebook.iOS

Same as above, I have configured long paths, removed bin/obj/.nuget, nothing works.

14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.sharekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface". Beginning retry 1 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.loginkit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\x86_64.swiftinterface" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\x86_64.swiftinterface". Beginning retry 2 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\x86_64.swiftinterface'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.loginkit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\arm64.swiftinterface" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\arm64.swiftinterface". Beginning retry 2 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\arm64.swiftinterface'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.corekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\tvos-arm64_x86_64-simulator\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-tvos-simulator.swiftdoc" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\tvos-arm64_x86_64-simulator\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-tvos-simulator.swiftdoc". Beginning retry 2 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\tvos-arm64_x86_64-simulator\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-tvos-simulator.swiftdoc'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.corekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-ios-macabi.swiftdoc" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-ios-macabi.swiftdoc". Beginning retry 2 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-ios-macabi.swiftdoc'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.corekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\x86_64-apple-ios-macabi.swiftdoc" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\x86_64-apple-ios-macabi.swiftdoc". Beginning retry 2 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\x86_64-apple-ios-macabi.swiftdoc'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.sharekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface". Beginning retry 2 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.loginkit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\arm64.swiftinterface" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\arm64.swiftinterface". Beginning retry 3 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\arm64.swiftinterface'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.corekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\x86_64-apple-ios-macabi.swiftdoc" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\x86_64-apple-ios-macabi.swiftdoc". Beginning retry 3 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\x86_64-apple-ios-macabi.swiftdoc'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.loginkit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\x86_64.swiftinterface" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\x86_64.swiftinterface". Beginning retry 3 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.LoginKit.resources\FBSDKLoginKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKLoginKit.framework\Modules\FBSDKLoginKit.swiftmodule\x86_64.swiftinterface'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.corekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-ios-macabi.swiftdoc" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-ios-macabi.swiftdoc". Beginning retry 3 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\ios-arm64_x86_64-maccatalyst\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-ios-macabi.swiftdoc'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.corekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\tvos-arm64_x86_64-simulator\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-tvos-simulator.swiftdoc" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\tvos-arm64_x86_64-simulator\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-tvos-simulator.swiftdoc". Beginning retry 3 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.CoreKit.resources\FBSDKCoreKit.xcframework\tvos-arm64_x86_64-simulator\FBSDKCoreKit.framework\Modules\FBSDKCoreKit.swiftmodule\arm64-apple-tvos-simulator.swiftdoc'.
14>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(4911,5): warning MSB3026: Could not copy "C:\Users\lesar\.nuget\packages\xamarin.facebook.sharekit.ios\12.2.0.1\lib\net6.0-ios15.4\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface" to "bin\Debug\net8.0-ios\ios-arm64\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface". Beginning retry 3 in 1000ms. Could not find a part of the path 'bin\Debug\net8.0-ios\ios-arm64\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64.swiftinterface'.

czmirek avatar Jan 20 '24 12:01 czmirek

Does anyone know if it's possible to run MAUI for iOS debug on real device from cmd somehow, without Visual Studio?

I'm trying the following command

dotnet build -t:Run -f net8.0-ios -p:RuntimeIdentifier=ios-arm64 -p:_DeviceName=obfuscated

But I'm getting this error It's currently not supported to launch an app from the command line on Windows

czmirek avatar Jan 20 '24 14:01 czmirek

@czmirek have you tried DotNet.Meteor? https://github.com/JaneySprings/DotNet.Meteor

Also, Visual Studio might still be able to deploy and debug. It's specifically the package restore (and maybe archive) features that are affected.

Something else... you may need to clear your local NuGet cache if Visual Studio has tried and failed due to these long file paths. Then run dotnet restore on command line, then try building / deploying / debugging from Visual Studio.

AdamEssenmacher avatar Jan 20 '24 20:01 AdamEssenmacher

Heyo, checking in.

Currently searching for solution because I can't open my file in VS 2022 on WIN 11 with REG EDIT key and win32 long paths enabled policy

Pretty frustrating...

maranmaran avatar Jan 21 '24 00:01 maranmaran

wow, its 2024 already and FCM iOS is still a problem with long path. i hope people didnt quit developing for iOS because of this.

is there a way to modify the FCM library (rename class name or what ever) to make the path short ?

khalil2099 avatar Jan 22 '24 03:01 khalil2099