Bug 10475 - Error updating Xcode project
Summary: Error updating Xcode project
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Mac Add-in ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2013-02-20 14:46 UTC by jesse.attas
Modified: 2013-03-07 08:31 UTC (History)
2 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 jesse.attas 2013-02-20 14:46:49 UTC
I get the following error when I try to open a Mac XIB file from Xamarin Studio 4.0(2003). It works fine if I open it from MonoDevelop 3.1.1. I can't follow the advice in the hint because IPartImportsSatisfiedNotification is part of Mono.

Error updating Xcode project. Could not generate class 'NationalInstruments.Restricted.Shell.StudioWindow' as its base type 'System.ComponentModel.Composition.IPartImportsSatisfiedNotification' could not be resolved to Objective-C.

Hint: Try adding [Register ("IPartImportsSatisfiedNotification")] to the class definition for System.ComponentModel.Composition.IPartImportsSatisfiedNotification.

MonoDevelop.MacDev.ObjCIntegration.ObjectiveCGenerationException: Could not generate class 'NationalInstruments.Restricted.Shell.StudioWindow' as its base type 'System.ComponentModel.Composition.IPartImportsSatisfiedNotification' could not be resolved to Objective-C.

Hint: Try adding [Register ("IPartImportsSatisfiedNotification")] to the class definition for System.ComponentModel.Composition.IPartImportsSatisfiedNotification.
  at MonoDevelop.MacDev.ObjCIntegration.NSObjectTypeInfo.GenerateObjcType (System.String directory, System.String[] frameworks) [0x000f8] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/a8219130/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectTypeInfo.cs:153 
  at MonoDevelop.MacDev.XcodeSyncing.XcodeSyncedType.SyncOut (IProgressMonitor monitor, MonoDevelop.MacDev.XcodeSyncing.XcodeSyncContext context) [0x0001b] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/a8219130/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs:78 
  at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.UpdateProject (IProgressMonitor monitor, System.Collections.Generic.List`1 allItems, MonoDevelop.MacDev.XcodeIntegration.XcodeProject emptyProject) [0x003a3] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/a8219130/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:154 
  at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateXcodeProject (IProgressMonitor monitor) [0x00030] in /Users/builder/data/lanes/monodevelop_private-lion-bigsplash/a8219130/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:481
Comment 1 Mikayla Hutchinson [MSFT] 2013-02-20 17:34:58 UTC
Strange. This might be an nrefactory issue. We're using type.DirectBaseTypes.First () 

What's are the base types/interfaces of StudioWindow, as listed in the type definition?
Comment 2 jesse.attas 2013-02-20 17:50:48 UTC
StudioWindow is a partial class. In one file, it implements IPartImportsSatisfiedNotification, INotifyPropertyChanged, and one other interface that's defined by us. In another file, it inherits from a class that we wrote, which eventually inherits from NSView.

There is also another class called StudioWindow in a different namespace.
Comment 3 Mikayla Hutchinson [MSFT] 2013-02-20 19:13:47 UTC
I guess we can't trust DirectBaseTypes to have the base class first if it's a partial class.
Comment 4 Jeffrey Stedfast 2013-02-21 15:25:21 UTC
fixed in git
Comment 5 Jeffrey Stedfast 2013-02-21 15:36:48 UTC
Jesse: I figured this might be preventing you from getting much work done, so I've uploaded a build with my fix here:

Comment 6 jesse.attas 2013-02-21 17:48:43 UTC
Thank you. I am able to open the XIB from the version that you posted.
Comment 7 Jeffrey Stedfast 2013-02-21 18:28:21 UTC
Awesome, glad it's working for you now!
Comment 8 narayanp 2013-03-07 08:31:51 UTC
Today we have checked this issue with following build:

X.S 4.0 - 1645b898271456799b70944c8b356ed6c5c00fdf
Xamarin.Mac: 1.2.43
Mono 2.10.12 (mono-2-10/823e22f)
Xcode 4.5

We are successfully able to open .XIB files.

Changing the status to Verified.