NUnit project file cant reference assemblies which are not in subfolders

We use a developer tree like src (contains the master-SLN and other code-stuff) build (contains tools to build assemblies, code-doku, ..) bin (central common...

We use a developer tree like

  • src (contains the master-SLN and other code-stuff)
  • build (contains tools to build assemblies, code-doku, ..)
  • bin (central common output-folder for c#-compiler)

Under src normally the <project>.nunit should lay. But this file then references the assembly in a schema like: <assembly path="..\bin\Debug\EsriDE.PipelineManagement.Core.ClassExtensions.Test.dll" />

This gives an error by running nunit-console.exe: Could not load file or assembly ‘EsriDE.PipelineManagement.Core.ClassExtensions.Test’ or one of its dependencies.

The problem is, that nunit only could load assemblies which are located in a folder inside or under the folder which contains the nunit-project file.

I traced this error with fuslogvw and this gives the correct hint: Not probing location file:///C:/Projekte/PDE-000092/PRJ_SfgPraxair/trunk/bin/Debug/EsriDE.PipelineManagement.Core.ClassExtensions.Test.DLL, because the location falls outside of the appbase.

Putting the nunit-project file directly near the above quoted folders and deleting the “.." inside the file for the assembly locations corrects the problem and lets run nunit fine.