3
votes

My company is moving to continuous integration using Jenkins. We keep our code in Subversion. We code in C# (well I do, the others use php).

I've hit a snag, I can't get nUnit to work when I compile the project .

My project is a very simple one with just a single class and a few nUnit tests. Works fine in Visual Studio. It builds and I can run the NUnit console to test the code.

I can use Jenkins to extract the project from Subversion I can then build the code with msBuild. However, when I try to run NUnit from the the NUnit console I get told that nunit.framework.dll is missing.

nunit.framework.dll is in C:\Program Files (x86)\NUnit 2.5.10\bin\net-2.0\framework

I think it is looking for the nunit.framework.dll that is referenced by the project. Which is required to add NUnit tests to the project.

I note that when building from Visual Studio nunit.framework.dll is copied to the bin folder. I note that no contents of bin are stored in Subversion. I had to put a copy of nunit.framework.dll into C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Profile\Client so that msBuild could find it.

How do I get nunit.framework.dll into the output bin folder when using Jenkins and msBuild?

I've looked through a number of posts but non address this point.

Any thoughts would be welcome. Thanks, Richard

2

2 Answers

2
votes

In your Test project where you reference the Nunit.Framework.dll, right click on that and select properties ( or press Alt + Enter ) and make Copy Local to be True

enter image description here

0
votes

Subversion does not store output files ( i.e. dlls) by default. I rebuilt the project and added nunit.framework.dll to subversion. That way it gets popped out by Jenkins and can subsequently be referenced.