Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Using MonoDevelop 2.6.1 and MonoTouch 4.x
When an image is changed in the project which is set as "content", the image is not refreshed when the app is rebuilt. This happens even if the MonoDevelop "Clean" command is used.
The only way to get an image updated is to delete the bin and obj folders and then delete the app on the simulator.
Rebuilding then allows for the new image to be used.
Reassigning to MonoTouch, since its mtouch tool deploys the app to the simulator.
The 'mtouch' tool does not deploy, it simply ask the simulator to use the .app directory that MD created. Then the simulator proceed to deploy (copy some of) the files into it's own directory.
We had issues (and workarounds) for stale assemblies in the past. What happens is that the simulator updates files but never deletes them (if they were not longer part of the original .app). However I'm not aware that it ever failed to update files. The only workaround was to reset the simulator (not even deleting the .app in the simulator was enough).
Anyway there's a bug somewhere in the chain of events. Can you provide us with a small, self-contained, test case that shows the issue ? Thanks!
How to repo
2> Add an image as content
3>build to simulator
4>replace image with new one of same name
5>build to simulator
Old image remains
Example of how to repro bug in 2011-09-16 comment.
I can confirm this is an issue with MonoDevelop 2.8.0 and MonoTouch 4.2.2
Looks like MonoDevelop is not copying the files to bin/Debug/iPhoneSimulator/MyApp.app/<relativepath>
However, checking the properties on the file in MonoDevelop, I see that the defaults are:
Build Action: Content
Copy to output directory: Do Not Copy
Changing "Do Not Copy" to "Copy if newer" fixes the problem for me.
Ian: can you confirm?
That can't be correct. Copy to output has zero effect on the app bundle.
It makes a difference for me.
(Note that for Default.png, it doesn't appear to matter, but if you add a file named Xamarin.png, for example, setting that to Copy if newer makes all the difference in the world)
hmmm, I probably shouldn't have marked this FIXED yet. If this does solve it for Ian, then we probably want to look into why the default settings don't work and either make the default "Copy if newer" or fix whatever underlying issue remains.
The Content build action is what causes the file to get copied into the app bundle.
Copy to Output only causes it to get copied to the output directory, which has no effect on the app bundle at all.
Looks like Michael has tracked down the real issue (turns out that the "Copy if newer" change just happened to cause a side-effect which made this work)
Fixed in git, will be in 2.8.1