System.AppDomainUnloadedException: Attempted to ac
Hello,
I'm currently having a problem when I run NCover from command line to perform coverage of my dll containing Unit Tests.
Within this dll, I create and load a new .NET Application Domain (refer to the end of this post for the command issued).
If I do the same from within NCover-Explorer, all works fine! However, when it is run from command line using the command generated by the NCover-Explorer wizard, it generates an AppDomainUnloadedException exception at the end of the NCover processing.
The situation is the same if I execute this as a MSBUILD task.
I have tried not to unload the AppDomain in my UnitTest dll. However, behaviour is the same.
Any help is more than welcome... :-)
José
________________________________________
C:\Documents and Settings\abc>"C:\Program Files\NCover\NCover.Console.exe" //reg //w "S:\ACFW_NET\trunk\MessageService\Workspace\bin\Debug" //v //l "Coverage.lo
g" "S:\NUnit\ACFW_2.0__2.4.0.2\bin\nunit-console.exe" TR.ACFW_NET.MessageServiceUnitTest.dll
NCover.Console v2.1.0 (Administrator x86) - Code Coverage Analysis for .NET
Copyright (c) 2008 Gnoso Inc.
http://www.ncover.com
Registered to Customer #: 11769
NCover Enterprise Edition (1 User)
Command: S:\NUnit\ACFW_2.0__2.4.0.2\bin\nunit-console.exe
Command Args: "TR.ACFW_NET.MessageServiceUnitTest.dll"
Working Directory: S:\ACFW_NET\trunk\MessageService\Workspace\bin\Debug
Assemblies:
******************* Program Output *******************
NUnit version 2.4.0
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 5.1.2600 Service Pack 2
CLR Version: 2.0.50727.1433 ( Net 2.0.50727.1433 )
........................................
Tests run: 41, Failures: 0, Not run: 0, Time: 171.688 seconds
Unhandled exceptions:
1) : System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
***************** End Program Output *****************
Execution Time: 00:02:55s
Sequence Point Coverage: 52.9%
Branch Coverage: 48.7%
Coverage Xml: C:\Documents and Settings\acs\Coverage.Xml
Coverage Log: C:\Documents and Settings\acs\Coverage.log