[英]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.