Bug 42275 - Xamarin iOS library build with contains a xib , using the dll "NSInternalInconsistencyException Could not load NIB in bundle"
Summary: Xamarin iOS library build with contains a xib , using the dll "NSInternalInco...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-30 12:41 UTC by karthikeyanv
Modified: 2017-07-18 17:09 UTC (History)
10 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 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 karthikeyanv 2016-06-30 12:41:36 UTC
Xamarin iOS library build with contains a xib , using the dll in application I am getting the  "NSInternalInconsistencyException Could not load NIB in bundle"

Windows OS 10

Visual studio professional 2015

Xamarin iOS 9.4
Comment 1 Alex Soto [MSFT] 2016-06-30 13:52:21 UTC
Please include a small test case to reproduce the issue, also your full version informations, you can find it in the about box of visual studio or from Xamarin Studio.

The easiest way to get exact version information is to use the 
"Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" 
button and copy/paste the version informations (you can use the 
"Copy Information" button).
Comment 2 karthikeyanv 2016-06-30 16:40:09 UTC
Microsoft Visual Studio Professional 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Professional

Xamarin (dcea9c1)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (e98e962)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS (47eb74b)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 3 karthikeyanv 2016-06-30 17:03:16 UTC
1) Add xib to Xamarin.ios library. (xib contains the uicollectionview cell)
2) Register the nib for cell using the below :
3) Get cell below 

public override UICollectionViewCell GetCell (UICollectionView collectionView, Foundation.NSIndexPath indexPath)
var cell = collectionView.DequeueReusableCell ("ViewCell",indexPath);

return cell;

4) Build the project and get the assembly.
5) Add the assembly to application.
6) Use the assembly CustomCollectionView to application.
7) run the application, Exception thrown.

Notes: This issue not occur,if we connected Xamarin Mac Agent.
Comment 4 Manuel de la Peña [MSFT] 2016-08-02 16:23:38 UTC
Assigning it to the VS team.
Comment 5 Chris Hardy [MSFT] 2017-07-07 19:28:55 UTC
Hey! Are you still running into this issue? If possible, could you share with us a zipped project of a way to reproduce this issue (just so we are using the same xib/nib file here) and also to confirm that this is currently happening with the latest release.

Comment 6 Joaquin Jares 2017-07-17 13:08:06 UTC
@karthikeyanv I don't understand step 5. Are you manually copying the assembly from windows to the mac? Our builds are not expected to work while disconnected from the mac agent, specially for resources. Resources need some mac tools to run for them to be properly compiled, and we use the mac agent for that. We don't do resources in windows.
Comment 7 karthikeyanv 2017-07-18 04:13:22 UTC
@joaquin Jares If we connected mac agent, this problem not occur. But My issue is "without connect mac agent" and get the custom library, run time exception occurring.

I don't understand step 5. My custom library have nib file, if we add the custom library to any other application and used the nib in custom view of application. This issue is occurring.
Comment 8 Joaquin Jares 2017-07-18 17:09:14 UTC
The thing is you can't build a custom library with a nib disconnected to the Mac. That's not a scenario that we support. The nib file is created by a tool that runs on the mac. So it's expected that you will have an exception in that case. We only compile disconnected for you to have intellisense support without a mac, but running an app without a mac is not something we expect or support.