- Home /
How to prevent Unity from adding nunit and TestRunner references to my project?
I tried the unity test tools at some point, but I didn't like them so I decided to stick to MSTests and removed them.
I have deleted every trace of the TestTools, and even deleted the library folder containing the nunit and TestRunner dlls. However, every time I open the C# project from Unity, references to nunit framework and Testrunner are added - and they are spamming me with warnings because they are not found.
Can someone tell me why does unity keep adding these references? I want to stop it from adding them so I can keep my code warning-free.
Answer by HaraldNielsen · Oct 09, 2017 at 09:35 AM
Hi @andreim44 Currently there are noway to remove the references in you IDE. They are showed even when playmode tests are disabled https://docs.unity3d.com/uploads/Main/TestRunner5.png
If you have disabled the playmode test runner, nunit and the test runner assemblies will not be included in a player build. If you have deleted the nunit assemblies you will get reference errors because the IDE can not find the file. So if you can readd them the warnings will go away. We are working on a solution for references that im looking forward to share with you guys
Thank you. I know re-adding them will get rid of the errors, but I'd rather not fill my project with unused assets. $$anonymous$$y issue is that I removed any kind of unity test tools and the references still get added to the project, do you know by any chance what part of unity is adding them? $$anonymous$$aybe I can change that directly. But I have no idea what prompts the references to be added.
Did actually get an idea.
So the test runner is an extension, and those get automatically added. So if you delete that extention they should not get registered, and thus not get added as references.
You can find the folder in your unity installation: \Data\UnityExtensions\Unity\TestRunner
Just delete that and it will be removed.
$$anonymous$$ake a backup, just in case :) But you already deleted some files from there as I understand
Your answer
