我正在使用 MonoMac 3.0.6 和 Mono Runtime 2.10.12,并且我已经用它创建了一个应用程序。所以,我想用它打包 MonoRuntime:转到它的选项并选择链接“仅框架 SDK”。当我构建它时,我收到了这个错误:
构建:ThisSimpleApp (Debug|x86) 执行主编译... /Library/Frameworks/Mono.framework/Versions/2.10.12/bin/dmcs /noconfig "/out:/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/bin /Debug/ThisSimpleApp.exe" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.dll" ""/r:/Library/Frameworks/Mono.framework/Versions /2.10.12/lib/mono/4.0/System.Xml.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Core.dll" "/ r:/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Xml.Linq.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.12/ lib/mono/4.0/System.Drawing.dll" "/r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac.dll" /nologo /warn:4 /debug:完整的 /optimize- /codepage:utf8 /platform:x86 "/define:DEBUG" /t:exe "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/MainWindow.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/ MainWindowController.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/MainWindow.designer.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/Main.cs" ""/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/ AppDelegate.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/AppDelegate.designer.cs" 构建完成 -- 0 个错误,0 个警告cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/MainWindow.designer.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/Main.cs" ""/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/AppDelegate。 cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/AppDelegate.designer.cs" 构建完成 -- 0 个错误,0 个警告cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/MainWindow.designer.cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/Main.cs" ""/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/AppDelegate。 cs" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/AppDelegate.designer.cs" 构建完成 -- 0 个错误,0 个警告
更新应用程序清单
将 Mono 运行时合并到应用程序包 /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/mmp -linksdkonly "-minos=10.6" -o "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/ bin/Debug" -n "ThisSimpleApp" -a "/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.dll" -a "/Library/Frameworks/Mono.framework/Versions /2.10.12/lib/mono/4.0/System.Xml.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Core.dll" -a " /Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono/4.0/System.Xml.Linq.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.12/lib/mono /4.0/System.Drawing.dll" -a "/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac。dll" "/Users/shreyansh/Projects/ThisSimpleApp/ThisSimpleApp/bin/Debug/ThisSimpleApp.exe"
未处理的异常:System.TypeInitializationException:MonoMac.Bundler.Driver 的类型初始化程序引发了异常---> System.ComponentModel.Win32Exception:ApplicationName='pkg-config',CommandLine='--variable=prefix mono-2 ', CurrentDirectory='' 在 System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process 进程) [0x00000] 在 System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo , System.Diagnostics.Process 进程)[0x00000] 在:0 在 System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] 在 :0 在 MonoMac.Bundler.Driver.RunCommand(System.String 路径, System.String args, System.String[] env, System.String& output) [0x00000] in :0 在 MonoMac.Bundler。Driver..cctor () [0x00000] in :0 --- End of internal exception stack trace --- [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: MonoMac.Bundler.Driver 的类型初始化程序引发了异常 - --> System.ComponentModel.Win32Exception: ApplicationName='pkg-config', CommandLine='--variable=prefix mono-2', CurrentDirectory='' at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process 进程)[0x00000] 在:0 在 System.Diagnostics.Process.Start_common(System.Diagnostics.ProcessStartInfo startInfo,System.Diagnostics.Process 进程)[0x00000] 在:0 在 System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] 在 MonoMac.Bundler.Driver.RunCommand (System.String path, System.String args,System.String[] env, System.String& output) [0x00000] in :0 at MonoMac.Bundler.Driver..cctor () [0x00000] in :0 --- 内部异常堆栈跟踪结束 --- mmp 退出代码 1
- - - - - - - - - - - 完毕 - - - - - - - - - - -
构建:1 个错误,0 个警告
它退出......
我想问是否有人可以帮助我,因为我已经为此苦苦挣扎了一个月。