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.
When we started included a custom Settings.bundle for our MonoTouch application we could no longer debug (it just keeps waiting for the app to connect to the debugger). It worked at first, and it appears that MonoTouch tries to merge our settings with the debug settings. However, after a clean build the merge did not take place. The debug settings were then missing from the settings bundle, and thus the app never tried to connect to the debugger. If I remove the custom settings bundle from my build and then do a clean build again then debugging starts to work again. Then I can reenable my custom settings. However, next time I do a clean build the debugger stops working yet again.
Since I think this is a built-time issue (not a debugger issue per se) I'm filing this under Tools.
I tried this, and I couldn't reproduce it with a simple Settings.bundle/Root.plist. Can you attach your Settings.bundle directory to the bug so I can try it out?
Created attachment 1516 [details]
Root.plist for our settings bundle
This is the Root.plist for our settings bundle. I did not include the Settings.bundle directory itself because it's just a folder, and this is the only file in it.
Note that in order to reproduce this you have to have a custom settings bundle and then do a CLEAN build. If you build, then add a settings bundle, then build again it will work. However, if you then clean and rebuild it fails. Our group didn't notice it at first either for that reason, but as soon as I did a clean build I could no longer debug. We have reproduced this with multiple machines, so it's not just me.
What's the build action of your Root.plist? It should be "Content", otherwise it won't be merged in.
It is "Content". This is what the project file contains:
I can't reproduce the behavior you see no matter what I do.
Can you try putting your Root.plist in a new project to see if it happens there too? And if so, can you then attach the entire project here?
Created attachment 1526 [details]
Attached a test project. Just open and debug. The debugger fails to attach.
It looks like the difference is that the Root.plist is read-only. If I make it writable then it works. If I do a clean build while it's read-only then it fails.
Like the rest of our application, our Root.plist is in source control. The source is therefore read-only by default. It looks like something makes it writable in the root directory of the build output (i.e., bin/), but if you look at the version in the .app bundle it is read-only. Something is failing to change the permissions during the build.
Perfect, I can reproduce now => MonoDevelop
it seems like a bad idea to just start overriding the file system permissions of all Content files, forcing them to be read-write when they are read-only in the project.
Since this is a change that we need to make to merge the data, we should change the permissions.
Part of the design
Looks like Alan already modified the build to forcibly add write-access to the entire output directory in the iPhone Build Extension code.
I should mention that Alan's commit was made on 3/13/2012, looks like the fix just missed the 126.96.36.199 release.
is this really fixed?
I can still reproduce this issue in Xamarin Studio 4.0.12 b3 and Xamarin.iOS 188.8.131.52
As soon as I add a custom Settings.Bundle to my project debugging on the device stops working.