Can't build for iOS with Xamarin Forms[BUG]
Description
Including SkiaSharp in the Xamarin forms project, Windows paired to a Mac, then trying to build yields the following error:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): error : DirectoryNotFoundException: Could not find a part of the path '/Users/
which means it won't build the app.
It seems this _CodeSignature is not copied from the nuget package for some reason?
Code
Make a new Xamarin Forms project in Visual Studio, get the SkiaSharp package from Nuget, pair to a mac from your PC, build, see the the failure.
Expected Behavior
The _CodeSignature folder should exist.
Actual Behavior
_CodeSignature folder is missing, and the the build fails.
Basic Information
- Version with issue: 2.80.2
- Last known good version: 2.80.2
- IDE: Microsoft Visual Studio Enterprise 2019, Version 16.9.5
- Platform Target Frameworks: Xamarin Forms Portable build to iOS.
- iOS: 11
- Target Devices: iPhone 7, Software version 14.4.2
Been fighting this few days, thought that was coming from my settings. But after reformatting reinstalling Mac from scratch and having set up all the certificates again, it's the same: it's compiling-signing ok for real device until i add SkiaSharp nuget. This appeared after upgrading to XCode 12.5. Still don't know if this is a new apple's requirement for third-party libs to be imperatively signed OR a visual studio build bug OR xcode bug.. Any thoughts?
My error:
MessagingRemoteException: An error occurred on client Build169000292 while executing a reply for topic xvs/build/execute-task/XamarinTestApp.iOS/31c782e002fCodesign AggregateException: One or more errors occurred. DirectoryNotFoundException: Could not find a part of the path '/Users/Airboom/Library/Caches/Xamarin/mtbs/builds/XamarinTestApp.iOS/31c782e90715fd993ed01e15963fc6f699e2dc9661442e7b92edfc01c6ad08cb/bin/iPhoneSimulator/Debug/XamarinTestApp.iOS.app/Frameworks/libSkiaSharp.framework/_CodeSignature'. XamarinTestApp.iOS
This is a very urgent matter..
Hi, I have the same problem! I have two projects with SkiaSharp on two comupters and I get the same error in iOS project. Android works. I noticed also, that the common Project shows following warning: warning NU1701: Package 'SkiaSharp.Views 2.80.2' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
I deletes all Nuget packages and reinstalled them in the project. Nothing helps.
Thanks
Hello everybody.
I have exacty the same issue here, trying to run the iOS emulator from Visual Studio (Windows) paired with the Mac. The weird thing is that if I compile/debug from Visual Studio for Mac, everything works fine.
Right now I'm not able to debug from Visual Studio and I have to work on Mac :(
Thank you. -marcello
EDIT Please note that this issue can be related to this issue with Xamarin.iOS
Hello.
I have the same problem with SkiaSharp after updating xcode 12.5 and VS 16.9.5.
DirectoryNotFoundException: Could not find a part of the path '/Users/xxxxxx/Library/Caches/Xamarin/mtbs/builds/App.iOS/6635a42b07b773f91fc2b39356bd40a5a6aa09cd70010ccd9d3e89de3a4c1a2a/bin/iPhone/Debug/device-builds/iphone9.3-14.5.1/App.iOS.app/Frameworks/libSkiaSharp.framework/_CodeSignature'.
Projects without SkiaSharp build normally.
Additional info after installing VS 16.10.0 preview 4 + Xamarin.iOS '14.19.0.7'
(deleted ~\AppData\Local\Xamarin\iOS\Caches and ~\AppData\Local\Temp\Xamarin\XMA)
-
VS 16.9.6 + Xamarin.iOS '14.19.0.7 = same issue as above
-
VS 16.10.0 preview 4 + Xamarin.iOS '14.19.0.7' =
Compiling signing from Windows finishes without errors, when trying to deploy to:
a - simulator: fails without any error description b - real device: fails with:
error MT1006: Could not install the application '/Users/Airboom/Library/Caches/Xamarin/mtbs/builds/XamarinTestApp.iOS/31c782e90715fd993ed01e15963fc6f699e2dc9661442e7b92edfc01c6ad08cb/bin/iPhone/Debug/XamarinTestApp.iOS.app' on the device 'iPhone nicky': Package Inspection Failed Error (error: 0xe8000051).
PackageInspectionFailed: Failed to load Info.plist from bundle at path /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.08ASXq/extracted/XamarinTestApp.iOS.app/Frameworks/libSkiaSharp.framework``
Well to me it looks like a Visual Studio for Windows bug. Agree?
Hi I have the same problem I can deploy from Visual Studio for Mac 8.9.10 (build 4) but not from Visual Studio 16.9.6 I then get the foolowing error: MessagingRemoteException: An error occurred on client Build169000294 while executing a reply for topic xvs/build/execute-task/xxxxxx.iOS/05a14ae002fCodesign AggregateException: One or more errors occurred. DirectoryNotFoundException: Could not find a part of the path '/Users/xxxxxxx/Library/Caches/Xamarin/mtbs/builds/xxxxxx.iOS/05a14ae99af88b6e851484e35f30dfcb0d88549771d3e6791c11d2d825147791/bin/iPhone/Debug/xxxxxxx.iOS.app/Frameworks/libSkiaSharp.framework/_CodeSignature'
Hello, Same problem here. Tried with a brand new Xamarin.Forms solution. As soon as SkiaSharp.Views.Forms NuGet package is added to the solution iOS project won't compile. But downgrading to SkiaSharp.Views.Forms version 1.68.3 will work again
Hello, Same problem here. Tried with a brand new Xamarin.Forms solution. As soon as SkiaSharp.Views.Forms NuGet package is added to the solution iOS project won't compile. But downgrading to SkiaSharp.Views.Forms version 1.68.3 will work again
I tried downgrading the version to 1.68.3 and it still doesn't work.
In the emulator does not give me any error, but when I want to run it on the physical device I still have the same error:
MessagingRemoteException: An error occurred on client Build169000294 while executing a reply for topic xvs/build/execute-task/xxxxxxxxxxxx.iOS/ed22858002fCodesign AggregateException: One or more errors occurred. DirectoryNotFoundException: Could not find a part of the path '/Users/xxxx/Library/Caches/Xamarin/mtbs/builds/xxxxxxx.iOS/xxxxxxxxxx/bin/iPhone/Debug/xxxxxxxx.iOS.app/Frameworks/libSkiaSharp.framework/_CodeSignature'.
I tried downgrading the version to 1.68.3 and it still doesn't work.
In the emulator does not give me any error, but when I want to run it on the physical device I still have the same error:
MessagingRemoteException: An error occurred on client Build169000294 while executing a reply for topic xvs/build/execute-task/xxxxxxxxxxxx.iOS/ed22858002fCodesign AggregateException: One or more errors occurred. DirectoryNotFoundException: Could not find a part of the path '/Users/xxxx/Library/Caches/Xamarin/mtbs/builds/xxxxxxx.iOS/xxxxxxxxxx/bin/iPhone/Debug/xxxxxxxx.iOS.app/Frameworks/libSkiaSharp.framework/_CodeSignature'.
Hello gureAngel, Indeed I haven't tried it on a physical device, it sure doesn't work. Thank you for trying
Hi there,
Having the same issue with SkiaSharp.Views.Forms 2.80.2. iOS build failed with the error: DirectoryNotFoundException: Could not find a part of the path '/Users/developer/Library/Caches/Xamarin/mtbs/builds/MInspect.iOS/3f461d8a077ea1533355063303276a96508c09fa0c4d9422a2d65b43a569ef81/bin/iPhone/Debug/MInspect.iOS.app/Frameworks/libSkiaSharp.framework/_CodeSignature'.
VS 2019 16.9.6 XF v5.0.0.2012
Works fine if I rolled back SkiaSharp.Views.Forms to v1.68.3.
Thanks
Can confirm it compiles, signs and deploys OK on real iPhone with an older SkiaSharp.Views.Forms v1.68.3 🙉
Tested with VS 16.9.6 + Xamarin.iOS '14.19.0.7 + XCode 12.5
The interesting part is that the latest SkiaSharp.Views.Forms 2.80.2 nuget was causing no trouble before we upgraded to latest XCode and latest VS..
Downloading the project, reloading it, downgrading the version to 1.68.3, it worked again.
In case it helps, I ran into the exact same issue with https://www.nuget.org/packages/Xamarin.Google.iOS.Cast/. Strange thing is, I was on 16.9.6 and it was working, but after upgrading to 16.10.0 and downgrading back to 16.9.6 (due to another Xamarin bug) this issue started happening. Could have been triggered by me clearing cache/build folders as part of the upgrade/downgrade.
I had this issue pop up randomly today when trying to deploy to my iPhone instead of the Simulator. Now I cannot fix it.
After upgrading Visual Studio to 16.10.0 + Xamarin.iOS 14.20.0.1 it finally builds and signs ok, from Windows, using SkiaSharp.Views.Forms 2.80.2.
EDITED: Forgot to delete bin obj after replacing old nuget, it's still not deploying with lastest skia.. "PackageInspectionFailed: Failed to load Info.plist from bundle"
I have the same problem on VS Mac (latest version) but I don't even use SkiaSharp. Release mode is fine on both simulator and device, but not Debug. Wondering if it is not related to SkiaSharp at all.
I have the same problem on VS Mac (latest version) but I don't even use SkiaSharp. Release mode is fine on both simulator and device, but not Debug. Wondering if it is not related to SkiaSharp at all.
If you delete the build folder for release I think you will encounter the issue on release as well. It only started happening after I cleared my build folder when trying to fix another issue.
Same Issue:
- VS 16.10
- Xcode 12.5
- VS for Mac 8.10 Preview (build 1772) … also problems with the stable version, so I switched to preview to see if helps.
- Mono 6.12.0.140
- Xamarin.iOS: 14.20.0.1
Just create a new App-Project (for example with the tabbed app template)
- it compiles and runs in the simulator
Now add SkiaSharp Package Version 2.x upwards
- depending on the exact package version you get errors like: "Package inspection failed (error: 0xe8000051)" or with the newer packages some weird errors in the device-log (not sure though if they are all related to skia) like: "Invalid value for UNNotificationExtensionCategory in Info.plist" "Invalid value for UNNotificationExtensionCustomSectionIdentifier in Info.plist" "Unable to initialize CXCallDirectoryStore for reading and writing: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/CallDirectory, NSUnderlyingError=0x13be04820 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}" "Failed to set fraction completed: 0.00 for: com.companyname.App5" …
When you change the SkiaSharp Package to Version 1.68.3 - Die app compiles and starts again.
FWIW - VS 16.10 seems to have it's own bugs too! So I see that the apps doesn't have icons anymore and someone wrote, that the cannot upload Builds to Apple anymore because of this (see: https://developercommunity.visualstudio.com/t/Cant-deliver-to-the-appstore-since-last/1436223)
I don't know if this has to do with the problems we see with skiasharp 2.x currently
16.11 Preview 1 Xamarin iOS 14.20.0.1 XCode 12.5 (12E262)
The same issue )":
Same issue after upgrade x-Code to 12.5 and VS 16.10, Skia 2.80.0
Severity Code Description Project File Line Suppression State Error MessagingRemoteException: An error occurred on client Build169000292 while executing a reply for topic xvs/build/execute-task/ProjectName/c8561a8002fCodesign AggregateException: One or more errors occurred. DirectoryNotFoundException: Could not find a part of the path '../c8561a8a7bfbc1a65b4c3ab6271481afb331465d1040423802a41c646a20d0bc/bin/iPhone/Debug/device-builds/iphone10.2-14.4.2/../Frameworks/libSkiaSharp.framework/_CodeSignature'.