Exception when running two ncover instances at once
I was running ncover with NAnt and CruiseControl.NET to get code coverage.
Everything worked fine when I was running NCover on once project.
But when I added ncover on a different project (which sometimes builds at the same time as the first project) I started having failed builds (from both the first and second project).
The problem is that the projects are similar and share some dependencies.
This is the result from NAnt
[exec] NCover.Console v1.3.3 - Code Coverage Analysis for .NET - http://ncover.org
[exec] ******************* Program Output *******************
[exec] NUnit version 2.2.2
[exec] Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole.
[exec] Copyright (C) 2000-2003 Philip Craig.
[exec] All Rights Reserved.
[exec] OS Version: Microsoft Windows NT 5.2.3790.0 .NET Version: 1.1.4322.2300
[exec] .........................................................................................................................................................................................................................................................................................................................................................N......................N.N....................................................................................................................
[exec] Tests run: 481, Failures: 0, Not run: 3, Time: 25.297 seconds
[exec] Tests not run:
[exec] 1) UnitTests.TDTest.AccessTDPageWithParameters : This one fails for no reason sometimes
[exec] 2) UnitTests.HejTest.CreateHejPage :
[exec] 3) UnitTests.HejTest.CreateNHPage :
[exec] Unhandled Exception:
[exec] System.UnauthorizedAccessException: Access to the path "Tradera.NET.DLL" is denied.
[exec] at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
[exec] at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
[exec] at System.IO.DirectoryInfo.Delete(Boolean recursive)
[exec] at NUnit.Util.TestDomain.DeleteCacheDir(DirectoryInfo cacheDir)
[exec] at NUnit.Util.TestDomain.DeleteCacheDir(DirectoryInfo cacheDir)
[exec] at NUnit.Util.TestDomain.DeleteCacheDir(DirectoryInfo cacheDir)
[exec] at NUnit.Util.TestDomain.DeleteCacheDir(DirectoryInfo cacheDir)
[exec] at NUnit.Util.TestDomain.DeleteCacheDir(DirectoryInfo cacheDir)
[exec] at NUnit.Util.TestDomain.DeleteCacheDir(DirectoryInfo cacheDir)
[exec] at NUnit.Util.TestDomain.Unload()
[exec] at NUnit.ConsoleRunner.ConsoleUi.Execute(ConsoleOptions options)
[exec] at NUnit.ConsoleRunner.ConsoleUi.Main(String[] args)
[exec] ***************** End Program Output *****************
[exec] Copied 'D:\build\Tradera.NET\tools\ncover\Coverage.xsl' to 'D:\build\Tradera.NET\build_staging\test-reports\Coverage.xsl'
Build Error: NAnt.Core.BuildException
External Program Failed: ncover.console.exe (return code was 2)
--
The dependency Tradera.NET.DLL is referenced by both the first and second project. I will not always get an exception about this dependency but it is always a dependency that is referenced by both projects.
What can I do to fix the problem?
Right now I have do "force build" and the project always builds fine.