命令行 – 使用mdtool编译monotouch应用程序失败,适用于MonoDevelop

我有一个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运行正常,但是失败非常糟糕.如果任何人有任何想法,我很乐意解决这个问题.

解决方法

这是一个错误,但是只有xib或项目(csproj)文件比设计器文件更新,才会生成设计器代码.在IDE中构建一次或“触摸”设计器文件,mdtool将再次工作.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...