我有下一个错误:
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
如何解决?
答案 0 :(得分:0)
测试代码必须在编辑器下,因此它可以编译为Assembly-CSharp-Editor-*。dll,该文件具有对nunit dll的引用。
鉴于对Assembly-CSharp-*。csproj的快速检查,我会发现这特别令人困惑,它将显示nunit.framework作为参考,并且如果您将msbuild指向vscode中生成的解决方案,它也会建立一个事实(同时导致Unity的“刷新”失败。
答案 1 :(得分:0)