I have this problem too. Instead of creating a new bug against NUnit 2.5.5, here is my test log.
This test requires my test dll to load a 3rd party dll file. And this only happened in nunit-console.exe. Works fine in the GUI mode.
C:\Builds>nunit-console DataAccess-UTest.dll
NUnit version 2.5.5.10112
Copyright (C) 2002-2009 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 3
CLR Version: 2.0.50727.3607 ( Net 2.0 )
ProcessModel: Default DomainUsage: Single
Execution Runtime: net-2.0
.F
Tests run: 1, Errors: 1, Failures: 0, Inconclusive: 0, Time:
45,1258664 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Errors and Failures:
1) Test Error : DataAccess.Test.Test.TestImport
System.NullReferenceException : Object reference not set to an
instance of an object.
at DataAccess.Test.Test.TestImport() in e:\DataAccess\DataAccess-
UTest\Test.cs:line 69
Unhandled Exception:
System.AppDomainUnloadedException: Attempted to access an unloaded
AppDomain.
at System.AppDomain.get_FriendlyName()
at NUnit.Util.DomainManager.DomainUnloader.Unload()
at NUnit.Util.TestDomain.Unload()
at NUnit.ConsoleRunner.ConsoleUi.Execute(ConsoleOptions options)
at NUnit.ConsoleRunner.Runner.Main(String[] args)
I have this problem too. Instead of creating a new bug against NUnit 2.5.5, here is my test log.
This test requires my test dll to load a 3rd party dll file. And this only happened in nunit-console.exe. Works fine in the GUI mode.
C:\Builds> nunit-console DataAccess- UTest.dll Test.Test. TestImport NullReferenceEx ception : Object reference not set to an Test.Test. TestImport( ) in e:\DataAccess\ DataAccess- AppDomainUnload edException: Attempted to access an unloaded AppDomain. get_FriendlyNam e() DomainManager. DomainUnloader. Unload( ) TestDomain. Unload( ) nner.ConsoleUi. Execute( ConsoleOptions options) nner.Runner. Main(String[ ] args)
NUnit version 2.5.5.10112
Copyright (C) 2002-2009 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 3
CLR Version: 2.0.50727.3607 ( Net 2.0 )
ProcessModel: Default DomainUsage: Single
Execution Runtime: net-2.0
.F
Tests run: 1, Errors: 1, Failures: 0, Inconclusive: 0, Time:
45,1258664 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Errors and Failures:
1) Test Error : DataAccess.
System.
instance of an object.
at DataAccess.
UTest\Test.cs:line 69
Unhandled Exception:
System.
AppDomain.
at System.
at NUnit.Util.
at NUnit.Util.
at NUnit.ConsoleRu
at NUnit.ConsoleRu