I am in the process of configuring my company's build server (running CruiseControl.NET) to run NUnit tests. To improve build time by reducing file IO, the build is setup to turn Copy Local off using a custom target file (basically what is shown here: How do I override CopyLocal (Private) setting for references in .NET from MSBUILD). However, Copy Local = false brings up runtime assembly binding errors ("could not load file or assembly") when running NUnit on the build server for test projects that reference other assemblies, because those assemblies are not copied into the /bin directory of the test project.
I can turn Copy Local on to get this to work, but that slows down the build. I am wondering, is there a strategy I could be using to be able to run NUnit tests on the build server while keeping Copy Local = false? I assume this situation has applied to someone else before and I'm missing something obvious.
For reference, here is how I am running each test project in the CruiseControl.NET build config:
<exec>
<executable>nunit-console.exe</executable>
<baseDirectory>C:\Program Files\NUnit 2.6\bin</baseDirectory>
<buildArgs>C:\Source\UnitTests.csproj /xml:C:\BuildLogs;\$(ProjectName)\NUnitResults\nunit-results.xml</buildArgs>
</exec>