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,編譯通過