无法加载 nibName 问题 (xamarin)

Could not load the nibName issue (xamarin)

我们开始使用 Xamarin studio 为少数应用程序准备具有通用解决方案的项目(我们的想法是让我们所有的应用程序都使用相同的 "Core" 组件)。

我们从准备具有基本功能的通用“核心”开始。我们还添加了 "subCore" - 具有特定于每个平台的功能的库(iOS、android、windows 等)。

目前正在为 AndroidiOS 设置这样的结构。

macOS 的第二步实施中,我们面临的阻塞点很少。

当我们尝试为 macOS 平台配置(以上述方式)结构时出现问题。

我能够创建 macOS class 库,其中包含应在应用程序中重用的组件(目前这只是 1 class 与 xib 文件)。但是,当我想在 macOS 目标中使用这个包(里面有 xib )时,出现异常:

External Modification Warnings: Debugger attached to process.

Application Specific Information: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[NSNib _initWithNibNamed:bundle:options:] could not load the nibName: MainViewController in bundle (null).' terminating with uncaught exception of type NSException abort() called

经过一番调查,发现 Mac Build server is not converting xibs into nibs,所以这个 nib 文件只是在 Xamarin 创建的包中丢失了。

其他测试信息,基于在 Xamarin 论坛中找到的建议解决方案:


我发现 this post,其根本原因与我的完全相同:

Mac Build server is not converting xibs into nibs.

根据对此 post 的讨论,问题应该得到解决,但我仍然面临这个问题。

有人可以建议如何解决所描述的问题吗?

任何遇到同样问题的人,请安装

xamarin.ios-10.13.0.27.pkg

xamarin.mac-3.7.0.27.pkg

此版本包含对所述问题的修复。

如需更多信息,请访问 this page