[英]The type or namespace name 'NUnit' could not be found | Unity
我有下一個錯誤:
The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'UnitySetUpAttribute' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'UnitySetUp' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'TestAttribute' could not be found (are you missing a using directive or an assembly reference?)
更多下一個頁面:
代碼: https://pastebin.com/5zTjwPZw
怎么修?
測試代碼需要在編輯器下,因此它編譯為 Assembly-CSharp-Editor-*.dll 引用了 nunit dll。
我發現這特別令人困惑,因為快速檢查 Assembly-CSharp-*.csproj 將顯示作為參考列出的 nunit.framework,並且如果您將 msbuild 指向 vscode 中生成的解決方案,它也會構建(同時失敗Unity“刷新”)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.