Bug 6284 - Organizing images in subfolders does not deploy correctly
Summary: Organizing images in subfolders does not deploy correctly
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-07-25 14:09 UTC by Stuart Carnie
Modified: 2012-08-02 17:25 UTC (History)
1 user (show)

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

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:
Status:
RESOLVED FIXED

Description Stuart Carnie 2012-07-25 14:09:17 UTC
When creating a folder, e.g. "images", in the project explorer to organize images, these are deployed in the app bunder under a respective "images" folder.  This causes UIImage.FromBundle to fail.

Please add a option (per folder) to allow these to be deployed to an alternate folder of the bundle, including relative paths for maximum flexibility.  I'd be happy to help change this, but I suspect it's in the monotouch portion of the code base.
Comment 1 Stuart Carnie 2012-07-25 14:14:38 UTC
The same problem exists for xibs too – not just images.  Be nice to organize them in a 'virtual' folder, so they don't clutter the project.
Comment 2 Jeffrey Stedfast 2012-07-25 14:35:30 UTC
This is implemented (in a way) in MonoDevelop 3.0.4 which will be out later this week.

If you create a special "Resources" folder, anything in that folder is deployed to the bundle root (or you can override the Bundle ID attribute to specify where it should go).
Comment 3 Stuart Carnie 2012-08-02 16:59:31 UTC
If I create the Resources folder and build, I receive an error for each file in this folder:

The folder name 'Resources' is reserved and canot be used for Content files
Comment 4 Stuart Carnie 2012-08-02 17:00:10 UTC
I am running MD 3.0.4.2
Comment 5 Jeffrey Stedfast 2012-08-02 17:07:05 UTC
Could you check if the files are marked with a Build Action set to "BundleResource"? If they aren't, try changing them to "BundleResource" and see if that fixes it.
Comment 6 Stuart Carnie 2012-08-02 17:25:49 UTC
Excellent – that solved it!