我有一个Monotouch iPad应用程序,我正在尝试设置一个自动构建脚本.我试图使用mdtool,但我似乎打了墙.如果我使用MonoDevelop GUI构建解决方案,它会成功构建.但是,如果我清理该解决方案并使用mdtool进行构建,则会在未知文件中获取有关空引用异常的异常.
过去几个小时,我已经搜索了一下.我以为我在Stack Overflow上找到了几条线索,但是他们似乎都是不一样的.没有太多关于在UI中成功构建和CLI上的故障.
这里有一些输出:
Performing main compilation... Updating CodeBehind files ERROR [2011-06-03 11:27:52Z]: Error generating code for xib file '/Users/Me/Documents/Code/MyApp/MainWindow.xib' System.NullReferenceException: Object reference not set to an instance of an object at MonoDevelop.DesignerSupport.CodeBehindWriter.<get_OpenFiles>m__21 () [0x00000] in <filename unknown>:0 at MonoDevelop.Ide.DispatchService.GuiSyncDispatch (MonoDevelop.Ide.MessageHandler cb) [0x00000] in <filename unknown>:0 at MonoDevelop.DesignerSupport.CodeBehindWriter.get_OpenFiles () [0x00000] in <filename unknown>:0 at MonoDevelop.DesignerSupport.CodeBehindWriter.Write (System.CodeDom.CodeCompileUnit ccu,FilePath path) [0x00000] in <filename unknown>:0 at MonoDevelop.MacDev.XibCodeBehind.GenerateDesignerCode (MonoDevelop.DesignerSupport.CodeBehindWriter writer,MonoDevelop.Projects.ProjectFile xibFile,MonoDevelop.Projects.ProjectFile designerFile) [0x00000] in <filename unknown>:0 at MonoDevelop.MacDev.MacBuildUtilities.UpdateCodeBehind (IProgressMonitor monitor,MonoDevelop.MacDev.XibCodeBehind generator,IEnumerable`1 items) [0x00000] in <filename unknown>:0
我执行的命令如下所示:
/Applications/MonoDevelop.app/Contents/MacOS/mdtool -v build "--configuration:Release|iPhone" "/Users/Me/Documents/Code/MyApp/MyApp.sln"
只是为了保持彻底,这里是我的版本:
OS X: 10.6.7 XCode: 3.2.6 iOS SDK: 4.3 Mono: 2.10.2 MonoDevelop: 2.4.2 MonoTouch: 4.0.3
更新(6/7/2011):
作为替代,我尝试做mdtool generate-makefiles.它创建了一切可以期待的东西,并且./configure运行正常,但是失败非常糟糕.如果任何人有任何想法,我很乐意解决这个问题.