Nathan M
Nathan M

Reputation: 933

Xamarin iOS, FileNotFound for Bundle Resources

I keep getting the error like this:

Error       System.IO.FileNotFoundException: /Users/Nathaniel/Library/Caches/Xamarin/mtbs/builds/EagleEyePrism.iOS/7b66664107c017167463bbde19c6a2f4/obj/iPhone/Debug/optimized/upload_blue.png does not exist
File name: '/Users/Nathaniel/Library/Caches/Xamarin/mtbs/builds/EagleEyePrism.iOS/7b66664107c017167463bbde19c6a2f4/obj/iPhone/Debug/optimized/upload_blue.png'
  at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x00193] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-08/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/File.cs:111 
  at Xamarin.MacDev.Tasks.SmartCopyTaskBase.CopyFile (System.String source, System.String target, System.String targetItemSpec) [0x0002d] in <cd319828b05749ae9de0c80034a6d2bc>:0 
  at Xamarin.MacDev.Tasks.SmartCopyTaskBase.Execute () [0x000b6] in <cd319828b05749ae9de0c80034a6d2bc>:0    EagleEyePrism.iOS           

It doesn't matter what file it is. If I remove upload_blue.png, it throws an error on the next Resource.

I have tried everything. I have deleted the Xamarin cache on the Mac, I've deleted AppData\Local\Xamarin on the PC, it simply will not compile. If I set all the BundleResources to Embedded Resources, it will compile and run, but then none of my image collateral gets displayed.

I've scoured the internet for hours trying to solve this problem.

I'm running the latest XCode on the Mac, with MacOS Mojave, and Windows 10 with Visual Studio 2019 on the PC.

Upvotes: 0

Views: 1405

Answers (1)

Nathan M
Nathan M

Reputation: 933

I solved it by disabling the Optimize PNG images option in the iOS Build Options

Upvotes: 6

Related Questions