Question

I would first like to admit that I am an extremely novice developer, so I'm doing my best to give all of the relevant information to make this question answerable:

So I'm trying to do some unit tests for NxBRE before I start attempting further work with the engine. I've downloaded both NxBRE and NUnit (version 3.2 and 2.6 respectively) and I've tested NUnit to make sure that it is working properly using a simple example that I could post here, but seems irrelevant to do so. What's important was that I was easily able to reference the nunit.framework.dll in the example, and the tested attributes compiled and the GUI ran the tests perfectly. I'm using SharpDevelop by the way.

I then opened up the provided NxBRE solution, which has two projects (NxBRE and NxBRE-UnitTest), added the same reference in the Unit-Test project to the nunit.framework.dll, and attempted to build the solution. I got a compiler error (along with the host of associated errors) stating that:

CS0246: The type or namespace name 'nunit' could not be found (are you missing a using directive or an assembly reference?)

Well, I was pretty sure I wasn't missing either, so I double checked the reference, and it seemed good (in that I re-added it in the way that I had for my test example). I even manually copied the .dll to the directories that were being accessed. I don't think it was an issue with NUnit itself, because I went back to my crafted example and it still ran fine.

Do you have any suggestions for trouble-shooting ideas or techniques that I should try?

Was it helpful?

Solution

I examined the .csproj file of the NxBRE 3 test project, and there is no directory path associated with nunit.framework.

In other words, the test project expects NUnit to be installed in the Global Assembly Cache. Could it be that you have not installed NUnit via its .msi file but rather unpacked it from a .zip file?

My recommendation is that you remove the nunit.framework reference from the test project and then add the reference again by browsing for the actual DLL file in the file system.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top