- Home /
Unity 5.3.4: The type or namespace name `NUnit' could not be found.
We recently upgraded our project to Unity 5.3.4. On doing so, I learned that Unity 5.3 now comes with NUnit, and sure enough it started complaining about duplicate class names, so I removed the NUnit dlls we had in the project (from Unity Test Tools). After this, everything seemed fine, then our builds occasionally started failing with a slew of errors from our test code similar to the following, when trying to compile the editor assembly:
Assets/Scripts/Bingo/Ball/Editor/BallHopperTest.cs(3,7): error CS0246: The type or namespace name `NUnit' could not be found. Are you missing a using directive or an assembly reference?
All of our unit tests are inside of Editor sub-folders, as they should be. Up until now, they have all compiled and run without problem, and seem to compile and run fine with Unity 5.3.4 most of the time.
Up until today, this would only happen sometimes on our automated builds and was an annoyance. Today, the errors started showing up in editor on one of our developer's machines and he is now unable to run the game because of them. Meanwhile, everything still compiles and runs fine on every other developer's machine and the test files show no such errors in them for anyone but him.
Can anyone explain what is going on here, or have any ideas as to how we can resolve this?
Answer by tanoshimi · Apr 14, 2016 at 05:52 AM
Haven't upgraded to 5.3.4 so don't know how NUnit is integrated, but could it be to do with script compilation order? I see that the script throwing the error is in the /editor subfolder, so is it possibly being compiled before the NUnit dependencies? (whereabouts are they in your project structure? Also in /editor?) http://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612074801im_/https://answers.unity.com/themes/thub/images/avi.jpg)