Unity3d Editor使用cs文件與Plugins dll文件沖突的問題


在Plugins目錄下導入LitJson.dll文件后,系統提示

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'LitJSON'.

  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0

  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0

經過調試發現造成錯誤的是在Editor目錄下的CS文件,無論CS文件內容是什么只要是.cs擴展名的文件存在Editor目錄下系統就會報錯。

懷疑是Editor目錄下如果有.cs文件u3d就會加載某系程序集,而就是這個程序集與LitJson.dll的程序集沖突。

不完美的解決方法,將Editor 目錄下的.cs文件刪除掉或者將其改為js文件。

將繼續探索解決之道。

 

 

終極解決方法就是將Litjson的版本降低。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM