NUnit project file

The .nunit file is used by NUnit to load a NUnit project. In the case of NBi, this file references the configuration file and a dll from the NBi framework.

It contains three important information:

  • The appbase: The root directory, other paths will be relative to the directory specified in this attribute
  • The configfile: Relative path to the config file
  • The assembly path: Relative path to NBi framework

This file can be generated by NUnit project editor (provided with NUnit) or alternatively by any xml or text editor editor.

Xml or text editor

Open the project file with your favorite editor. The content should be :

  <Settings activeconfig="Default" processModel="Default" domainUsage="Default" />
    binpathtype="Auto" appbase="..\"
    <assembly path="Framework\NBi.NUnit.Runtime.dll" />

NUnit project editor

Execute NUnit.exe and create a new project with File > New Project (save it as MyTests/MyTestProject/MyTestProject.nunit).

Save project

Edit the project Project > Edit

Edit project

and reference the AppBase as the parent-folder. All paths in this file and the config file are related to this AppBase path.

Then the config file as “MyTestProject\MyTestProject.config”.

AppBase and config file

In the tab assemblies, click to add a new assembly to the project.

Add an assembly

reference the NBi.NUnit.Runtime.dll from the folder framework (others dll in the same directory will automatically been found by NUnit and loaded when required).

Select the correct assembly

This dll should be the only dll referenced in your project.

One assembly referenced