Bug 35353 - Compile does not always include images in the build
Summary: Compile does not always include images in the build
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-10-29 10:00 UTC by paulo
Modified: 2016-03-11 18:47 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Screen Shot 001 (100.93 KB, image/png)
2015-10-30 11:57 UTC, paulo
Screen Shot 002 (99.12 KB, image/png)
2015-10-30 11:57 UTC, paulo

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description paulo 2015-10-29 10:00:04 UTC
images stored in images.xcassets are not always being included when building to the simulator or physical device.

Physical device for testing is iPhone 6. iOS 9.1

Tough to recreate as once resolved it seems to be ok. Requires 3 or 4 'Build' - 'Clean All' runs before all get picked up.
Comment 1 Jeffrey Stedfast 2015-10-30 11:45:48 UTC
We've got a number of unit tests that make sure that this work and they have not failed.

Any ideas on how I could reproduce this?

Where are your images.xcassets? Are they in the main project or a referenced library project?

Are you sure that you are trying to load the images in the correct way?

Note that Apple's actool sometimes produces a file called Assets.car that contains a bundle of all of your images. In older versions of actool, the output image files would be stand-alone.

Could this be what you are seeing?
Comment 2 paulo 2015-10-30 11:56:50 UTC
It's a strange quirk where some images are loading and some are not - a 'Build - clean all' and then running again seems to then work...but not for all images.

Images are held in the iOS arm of the project in images.xcassets.

This also affects some imagery that is stored in a shared library and referenced by a shared UIView that is held there and included on the view controllers.

I had attached two screenshots to this thread that were taken 001 - clean all - 002. Notice how some images are there and then not (arrow) and some are not there and then are!

Also evident when deploying to device for testing.
Comment 3 paulo 2015-10-30 11:57:11 UTC
Created attachment 13587 [details]
Screen Shot 001
Comment 4 paulo 2015-10-30 11:57:27 UTC
Created attachment 13588 [details]
Screen Shot 002
Comment 5 Sebastien Pouliot 2016-03-11 18:47:12 UTC
It's hard to be 100% certain without a reproducible test case but several similar issues were fixed recently. Please try again with the latest alpha and re-open the bug if you can still reproduce it. Thanks!