Failed to resolve base type System.Security.Principal.GenericIdentity for type System.Net.HttpListen

更新了最新的Unity5.2 , 然后打算将 ULua 的代码打个包在 IL2CPP 下跑跑看有没有什么问题。结果打包就出现了错误。

Failed to resolve base type System.Security.Principal.GenericIdentity for type System.Net.HttpListen

Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out

查看错误提示到 UnusedBytecodeStripper2.exe 根据这个文件名来看,是用来裁剪无用代码的工具,是不是IL2CPP 裁剪代码出错了呢?


然而在设置中居然没有找到裁剪相关的选项。。。。

在官网找到下面的答案,测试后正常打包了。


http://forum.unity3d.com/threads/5-2-error-building-ios.349732/#post-2287024

Okay, here is the solution:

1. In Player Settings switch from IL2CPP to Mono in Scripting Backend
2. Then find the now appeared dropdown "Stripping Level" and change it from "use Micro mscorlib" to "Strip Byte Code"
3. Switch Back to IL2CPP in Scripting Backend

iOS Compiles fine now.
 


你可能感兴趣的:(Failed to resolve base type System.Security.Principal.GenericIdentity for type System.Net.HttpListen)