Bug 8409 - Resources from app project should override resources from bundle
Summary: Resources from app project should override resources from bundle
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 3.0.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
: 29016 ()
Depends on:
Blocks:
 
Reported: 2012-11-14 16:50 UTC by Mikayla Hutchinson [MSFT]
Modified: 2015-04-13 11:52 UTC (History)
3 users (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 Mikayla Hutchinson [MSFT] 2012-11-14 16:50:42 UTC
If a referenced library project has bundle resources with the same name as bundle resources in the app project, the ones in the app project should take precedence.

This means we should unpack resources from libraries *before* copying the project's bundle resources.
Comment 1 Jeffrey Stedfast 2012-11-15 10:59:35 UTC
fixed in git master
Comment 2 Anton Zhuravsky 2012-11-16 09:09:06 UTC
Fantastic! Any schedule for this to reach Beta channel?
Comment 3 Jeffrey Stedfast 2012-11-16 16:33:28 UTC
try http://files.xamarin.com/~jeff/MonoDevelop-858ac26fd4a9c686afc150684cc8e5eb7a1b4e32.dmg

I think that has the fix
Comment 4 Anton Zhuravsky 2012-11-19 04:38:07 UTC
Looks like this version doesn't extract XIB files from the library: images and text files (=content files) get over the resulting build, however, the XIBs from lib do not make it to the final app.
Comment 5 Anton Zhuravsky 2012-11-19 05:41:11 UTC
Actually, just noticed it does not extract Images sometimes as well (so far only during clean builds), so it looks like the bug is not actually fixed, but escalated :)
Comment 6 Jeffrey Stedfast 2012-11-19 17:00:35 UTC
hmmm, this isn't going to be trivial to fix.

Going to revert & reopen for now.
Comment 7 Jeffrey Stedfast 2012-11-19 17:55:59 UTC
n/m, found a way...

try http://files.xamarin.com/~jeff/MonoDevelop-5542f6c0aaa19e016f627f8bb202494c1db68888.dmg
Comment 8 Anton Zhuravsky 2012-11-20 08:07:51 UTC
Well, the resources are now copied over in all scenarios (clean build, dirty build etc). However, the resources from libraries still take precedence over the ones in main project.

I verified this by placing 2 xibs named in the same way in a lib project and an app project. The builded app always has the XIB from lib project :(
Comment 9 Jeffrey Stedfast 2012-11-20 10:22:21 UTC
Ah, I fixed it for everything but nibs

Fixed it for nibs now too.
Comment 10 Anton Zhuravsky 2012-11-20 10:23:22 UTC
Could you be so kind to compile one build with the fixes for me? :)
Comment 11 Jeffrey Stedfast 2012-11-20 11:54:03 UTC
http://files.xamarin.com/~jeff/MonoDevelop-d47d2492e675d5d20ed7f6cf56e370ebe9f1f702.dmg

It's still uploading, so give it a minute.
Comment 12 Anton Zhuravsky 2012-11-20 12:27:07 UTC
Looks like it is actually working, thank you!

One more issue, however – seems that if a resource is touched in a library project, it would get over app's one (maybe some kind of dirty flag set leading it to be copied over?). Anyway, I appreciate this to be a different bug as the general flow is working just right :)

Thank you very much for you time and assistance!
Comment 13 Jeffrey Stedfast 2012-11-20 13:58:10 UTC
Ah, right... because the list I'm adding to a "don't overwrite these"-hashset only included files that had changed since the last build... (which meant that it'd be empty for the main project) d'oh.

Okay, fixed that now, too.

Hopefully this build fixes the last of these corner cases.

http://files.xamarin.com/~jeff/MonoDevelop-1d1544fa6e654ecfa4264fd47fa6dfdaa0b8699d.dmg
Comment 14 Anton Zhuravsky 2012-11-26 04:33:42 UTC
Sorry for not providing feedback for couple of days. Yeah, looks like right now everything is in place (apart from few kinks which are rare and usually fixed by simple re-build). And as I do not see any obviously broken behavior, I would confirm the bug is fixed now :) 

Thank you very much for your efforts, it helped our team a lot and saved many hours of development!
Comment 15 Jeffrey Stedfast 2012-11-26 08:00:33 UTC
No prob, glad to be of service :-)
Comment 16 Jeffrey Stedfast 2015-04-13 11:52:54 UTC
*** Bug 29016 has been marked as a duplicate of this bug. ***