标签:MissingMethodException 4.7 Default stoneLSL found net 2.0 安装
Solutions:
– Use IL2CPP build instead of Mono2x
– Or, set Stripping Level: Disabled (any other stripping level didn’t work)
Probably the cause was changing Api Compatibility Level from “.net 2.0 Subset” into “.net 2.0”..
Instead of using Activator.CreateInstance
, you could also use reflection to instantiate your states. This has 2 benefits:
- You can implement some logic to find the correct constructor based on parameter types (and you'll get more descriptive errors if you mess something up)
- It performs a little better
Here's how you'd do that:
var ctor = typeof(T).GetConstructor(new []{typeof(GameObject)})
currentState = ctor.Invoke(new object[]{this.gameObject}) as T;
项目使用的版本是 .net Framework 4.7,编译通过,运行时报错
Method not found
刚开始以为是dll版本引入不一致,查了一下都是一样的
后来公司主管看到问题后,说时需要安装一下4.7.1,4.7.2
之前只安装了4.7.1
安装之后,果然可以运行了
因为微软在小版本上打了补丁,所以必须要安装一下。
————————————————
版权声明:本文为CSDN博主「stoneLSL」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/stoneLSL/article/details/88018390
标签:MissingMethodException,4.7,Default,stoneLSL,found,net,2.0,安装 来源: https://blog.csdn.net/mainidea/article/details/114917177
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。