Iphone 无法使用Xamarin.iOS在发布模式下生成ICSharpCode.SharpZipLib.dll-错误MT3001:无法对程序集进行AOT

Iphone 无法使用Xamarin.iOS在发布模式下生成ICSharpCode.SharpZipLib.dll-错误MT3001:无法对程序集进行AOT,iphone,xamarin.ios,Iphone,Xamarin.ios,尝试使用Xamarin.iOS在调试模式下为iPhone构建流行的库ICSharpCode.SharpZipLib.dll时,一切正常。当我切换到释放模式时,出现以下错误: error MT3001: Could not AOT the assembly 当我打开详细输出时,我得到的是: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -mipho

尝试使用Xamarin.iOS在调试模式下为iPhone构建流行的库ICSharpCode.SharpZipLib.dll时,一切正常。当我切换到释放模式时,出现以下错误:

error MT3001: Could not AOT the assembly
当我打开详细输出时,我得到的是:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc      -miphoneos-version-min=4.3 -arch armv7  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -c /var/folders/kn/1j5jxvv131zcyqmgy3yj_xfw0000gn/T/tmp13a8fd89.tmp/System.Data.dll.armv7.s -o /var/folders/kn/1j5jxvv131zcyqmgy3yj_xfw0000gn/T/tmp13a8fd89.tmp/System.Data.dll.armv7.o
error MT3001: Could not AOT the assembly '.../bin/iPhone/Release/ICSharpCode.SharpZipLib.dll'
  at MTouch.GetObjectFileForAssembly (System.String assemblyName, Abi abi) [0x00000] in <filename unknown>:0 
  at MTouch+<CompileAssemblies>c__AnonStoreyB.<>m__E (System.String s) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey36`1[System.String].<>m__34 (System.String e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey35`2[System.String,System.Object].<>m__32 () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-miphoneos-version-min=4.3-arch-armv7-std=c99-I/Developer/MonoTouch/sdk/MonoTouch.iPhoneOS.sdk/usr/include-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.Platforms/iPhoneOS.Platforms/Platforms-c/var/folders/kn/1j5jxvv131zcyqmgy3yj_xfw0000gn/T/tmp13a8fd89.tmp/System.Data.dll.armv7.s-o/var/folders/kn/1j5jxvvv131zcyqmgy3yj_xfw0000gn/T/tmp13a8fd89.tmp/System.Data.dll.armv7.o
错误MT3001:无法对程序集“…/bin/iPhone/Release/ICSharpCode.SharpZipLib.dll”进行AOT
在:0中的MTouch.GetObjectFileForAssembly(System.String assemblyName,Abi Abi)[0x00000]处
在MTouch+c__anonnstoreyb.m__E(System.String s)[0x00000]处输入:0
在System.Threading.Tasks.Parallel+c_AnonStorey36`1[System.String].m_34(System.String e,System.Threading.Tasks.ParallelLoopState s,System.Object l)[0x00000]中:0
在System.Threading.Tasks.Parallel+c_uAnonStorey35`2[System.String,System.Object].m_u32()[0x00000]中:0
在:0中的System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke(System.Threading.Tasks.Task所有者、System.Object状态、System.Threading.Tasks.Task上下文)[0x00000]处
在0中的System.Threading.Tasks.Task.InnerInvoke()[0x00000]处
在0中的System.Threading.Tasks.Task.ThreadStart()[0x00000]处
这是在LLVM打开和SGen打开的情况下进行的。当我按照本文()中的建议关闭SGen时,我得到了完全相同的MT3001错误

当我关闭LLVM时,它会再次工作。问题是我需要LLVM


如何在不关闭LLVM的情况下在Monotouch/Xamarin.iOS中构建此公共库?非常感谢您的帮助。

您提供的
mtouch
报告了大多数编译器错误。这会告诉我们它停止的位置(即AOTing
ICSharpCode.SharpZipLib.dll
),但不会告诉原因。在构建日志的前几行中,您应该有一些失败原因的详细信息(即来自AOT编译器本身的消息)。s您还没有提供正在使用的Xamarin.iOS版本:我知道类似的问题(使用LLVM和相同的.dll)已在几个月前修复。感谢您的回复--我在日志中进一步查找,找不到任何与ICSharpCode.SharpZipLib.dll相关的信息。你能澄清一下我在找什么吗?我确实看到了一些关于编译其他dll的东西,例如System.Data.dll,但本质上没有错误。版本号为3.1.1。您对如何继续有什么建议吗?您能提供整个生成输出吗?您是否使用Windows.Net DLL?除非为Xamarin.iOS重新编译,否则这将无法工作。我通常使用Xamarin.iOS类库项目下载源代码并链接所有内容。我很确定它不是Xamarin.iOS(或MonoTouch)3.1.1;-)获取确切版本信息的最简单方法是使用“Xamarin Studio”菜单、“关于Xamarin Studio”项、“显示详细信息”按钮并复制/粘贴版本信息(您可以使用“复制信息”按钮)。您可以粘贴该文件(以及完整的构建日志),并在问题中添加指向它们的链接。