Bug 19859 - Bad compilation: BundleResource'd item not included in build if build cache is not cleared
Summary: Bad compilation: BundleResource'd item not included in build if build cache i...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.12.x
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-05-16 14:15 UTC by softlion
Modified: 2014-09-11 14:09 UTC (History)
9 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 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 softlion 2014-05-16 14:15:44 UTC
In an ios project, i have files set as BundleResource.
These files are not found by the runtime when the app executes, when this app is built and deployed a second time. 
A fix is to clear the xamarin build host cache folders (executing the clean command from VS2013 won't work).
Comment 1 softlion 2014-05-16 14:16:20 UTC
cache folder on mac: mtbs/build
Comment 2 narayanp 2014-05-19 03:49:00 UTC
I have tried to reproduce this issue 

My project having some .png files their build action is 'Bundle Resources' I am successfully able to deploy application even seeing all images in my app at runtime. 

Is there anything else which I have missed here to reproduce this Issue?

@Softlion, Could you please provide some more steps or test project so that I can also reproduce it at my end?
Comment 3 softlion 2014-05-19 04:37:22 UTC
> able to deploy application

Try to use Adhoc/Release mode configuration.

This happens often in this configuration.
I've switched to beta channel and the issue seems fixed.
Comment 4 softlion 2014-05-19 17:00:24 UTC
I found the problem.

This is caused by the build action of some resource files which were set to "content" instead of "bundleresource".

These files are in the /resource folder. It seems this is not supported by the "content" action.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2014-05-20 03:34:05 UTC
OK, I'm closing this bug report then.
Comment 6 softlion 2014-05-20 09:48:36 UTC
Well, it does not resolve the problem.

The deployment bug is still present.

It seems to be triggered when switching configuration from debug/simulator to debug/iphone and vice/versa
Comment 7 softlion 2014-05-21 02:26:16 UTC
Yes it seems this is how to reproduce:

- build and deploy the solution once in the simulator (debug)
- switch to adhoc/debug, build and deploy the solution once on the device
=> lots of resources are missing
- clean the mtbs folder on mac, clean the solution, rebuild deploy => ok
- swith to simulator/debug, build and deploy the solution once
=> lots of resources are missing
Comment 8 softlion 2014-05-21 02:26:29 UTC
note: using vs2013
Comment 9 softlion 2014-05-26 11:20:20 UTC
I can reproduce it also in the simulator, by :
- build and deploy the solution once in the simulator (debug)
- switch to adhoc or release, build and deploy the solution once in the simulator
Comment 10 softlion 2014-07-31 15:23:38 UTC
So it is really caused by a cache bug, which does not understand the change of configuration.
Comment 11 Adam 2014-08-14 00:49:56 UTC
I am also experiencing this problem.

Reproduced using Visual Studio 2012, and Visual Studio 2013.
I also have two different mac build machines that I target from my one Visual Studio workstation - one experiences the issue, one does not (both are 7.2.6.28).

My build config is usually debug/simulator when I get the problem.
I never seem to get the issue when deploying to device.

It does not affect all files in the bundle resources folder - but the files that most often go missing are *.css and *.ttf files.
Comment 12 Adam 2014-08-15 00:29:54 UTC
To expand on this - the machine that is having problem is on OSX 10.9.4.
The machine that works fine (with the exact same build of Xamarin Build Host/Studio) is 10.8.5
Comment 13 softlion 2014-09-11 14:09:38 UTC
seems fixed in latest version