Bug 1684 - Classes decorated with fully qualified Register attribute don't generate header files
Summary: Classes decorated with fully qualified Register attribute don't generate head...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 2.8.1
Hardware: Macintosh Mac OS
: High normal
Target Milestone: ---
Assignee: Alan McGovern
Depends on:
Reported: 2011-10-25 15:30 UTC by competent_tech
Modified: 2011-12-29 05:06 UTC (History)
3 users (show)

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:

Description competent_tech 2011-10-25 15:30:04 UTC
If a class is marked with the [Monotouch.Foundation.Register] attribute, the header files are not generated. 

However, if the declaration is changed to [Register] and using Monotouch.Foundation is added, the header file is generated correctly.
Comment 1 Alan McGovern 2011-10-26 12:25:36 UTC
What version of MonoDevelop and MonoTouch are you using? I can't reproduce this error with MonoDevelop 2.8.1 and MonoTouch 5.0. If you are using those versions of MonoDevelop and MonoTouch, would you be able to attach a zip archive of a project demonstrating the issue.
Comment 2 Alan McGovern 2011-10-26 12:35:39 UTC
The only way I can reproduce types not showing up in Xcode is if the class decorated with [Register] is not a subclass of NSObject (or a type derived from NSObject like UIViewController etc). Could this be what you encountered?
Comment 3 competent_tech 2011-10-26 13:55:38 UTC
We are currently using MD 2.8.1 and MT 5.0.

I have tried multiple times to reproduce the issue today with no success. 

The files that I was having the issues with were originally generated in MD 2.6 and XCode 3 and they were inheriting from base classes that ultimately inherited from UIViewController. Unfortunately we have now converted all of the views to the new style (outlets only in code behind) and new views don't seem to have the issue. Perhaps it was a parsing issue related to the old style of control declarations?
Comment 4 Mikayla Hutchinson [MSFT] 2011-10-26 14:01:12 UTC
This might be a manifestation of bug 1546.
Comment 5 Alan McGovern 2011-10-27 04:33:18 UTC
I think bug 1546 has been fixed/worked around already. The other day I attempted to reproduce it and MD ended up waiting for the parser db to finish updating before syncing to xcode completed. I didn't get around to looking for the relevant commit though to confirm it.

It does sound like the most likely cause as he's running MD 2.8.1 though, especially since it can't be reproduced now.
Comment 6 Mikayla Hutchinson [MSFT] 2011-10-27 06:10:12 UTC
I'm not convinced, the code always blocked on the parser db and I still somehow saw the issue described.
Comment 7 Alan McGovern 2011-12-16 09:31:38 UTC
2.9.x now has a call to ensure the DB is updated so this issue should be non-existent when we merge the new resolver into md proper.
Comment 8 Atin 2011-12-29 05:06:35 UTC
Please provide more info or steps to reproduce of this bug, so that we can validate this issue.