在为osx创建安装程序时,合并Mono失败

时间:2011-05-10 20:07:21

标签: c# macos package monomac

当我尝试将我的MonoMac应用程序发布为mac安装程序时,出现以下错误。 我使用的是MonoDevelop 2.4.2,MonoMac 2.4.2.4,该项目是由“C#MonoMac Project”创建的一个新项目。

我刚刚添加了两个类,并通过MainWindow的Initialize调用它们。

Creating app bundle
Contents/Info.plist
Contents/PkgInfo
Contents/Resources/MainMenu.nib
Contents/Resources/MainWindow.nib
Contents/Resources/Scripts/itunes.scpt
Contents/Resources/Scripts/out.txt

Merging Mono into app bundle
mmp --linksdkonly -o "/tmp/monomac-build-634406615434742750" -n "djBillboard" -a "/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.Xml.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.Core.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.Xml.Linq.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.Drawing.dll" -a "/Users/Sebi/.config/MonoDevelop/addins/MonoDevelop.MonoMac.2.4.2.4/MonoMac.dll" -a "/Users/Sebi/Projects/djBillboard/lib/Nugget.dll" "/Users/Sebi/Projects/djBillboard/djBillboard/bin/Debug/djBillboard.exe"

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at MonoMac.Bundler.Driver.Link () [0x00000] in :0 
  at MonoMac.Bundler.Driver.Main (System.String[] args) [0x00000] in :0 

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at MonoMac.Bundler.Driver.Link () [0x00000] in :0 
  at MonoMac.Bundler.Driver.Main (System.String[] args) [0x00000] in :0 


Merging Mono failed

1 个答案:

答案 0 :(得分:2)

将链接器更改为“不链接程序集”为我解决了这个问题。