遊戲開發unity雜項系列: CSharpCodeProvider could not be found in the namespace Micrrosoft.CSharp

    unity 進行build and run 時報錯,The type name 'CSharpCodeProvider' could not be found in the namespace 'Microsoft.CSharp'. This type has been forwarded to assembly 'System.CodeDom, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly.

看到提示Version=4.0.0.0,應該是.Net 4.0的程序集纔有,需要設置unity使用的.Net版本。Edit->Project Setting->Player->APiCompatibilityLevel

設置爲4.x,編譯通過

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章