Re: Recurring Issues with log4net

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <008701c83b56$188eff30$6401a8c0@FERRARI>
Actually, I think this is a bug, in spite of your follow-up note. The
nunit.core assembly has a reference to log4net, which is satisfied when it
is loaded in the primary AppDomain but not in the test domain. You can fix
it by making sure the log4net assembly is copied to the right place, but you
shouldn't need to any more than you need to copy nunit.core itself.
 
Charlie


  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Nassar,
Anthony
Sent: Monday, December 10, 2007 9:19 AM
To: [email protected]
Subject: [Nunit-users] Recurring Issues with log4net


I don't have any evidence that this is an NUnit problem, but it's popped up
occasionally, and I can't remember how I fixed it. I believe this came up
recently. Does anyone have any insights? Correct me if I'm wrong: whether I
set SpecificVersion to true or false should make no difference to the
console runner, correct? I've got CopyLocal set to true; someone correct me
if I'm not supposed to be doing that. Anyway, here's the error, and as far
as I can tell, the assembly under test does not, directly or indirectly,
need log4net:
 
 [echo] Building C:\Builds\Omega LP
3.1.x\Testing\UtiltiesTests\UtilitiesTests.csproj using the 'Release'
configuration
[exec] NUnit version 2.4.4
[exec] Copyright (C) 2002-2007 Charlie Poole.
[exec] Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A.
Vorontsov.
[exec] Copyright (C) 2000-2002 Philip Craig.
[exec] All Rights Reserved.
[exec] Runtime Environment -
[exec] OS Version: Microsoft Windows NT 5.1.2600 Service Pack 2
[exec] CLR Version: 2.0.50727.1433 ( Net 2.0.50727.1433 )
[exec] Unhandled Exception:
[exec] System.TypeInitializationException: The type initializer for
'NUnit.Core.RemoteTestRunner' threw an exception. --->
System.IO.FileNotFoundException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of its dependencies. The system cannot find the file specified.
[exec] File name: 'log4net, Version=1.2.10.0, Culture=neutral,
PublicKeyToken=1b44e1d426115821'
[exec] at NUnit.Core.RemoteTestRunner..cctor()
[exec] WRN: Assembly binding logging is turned OFF.
[exec] To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
[exec] Note: There is some performance penalty associated with assembly bind
failure logging.
[exec] To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
[exec] --- End of inner exception stack trace ---
[exec] at
System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(IntPtr
type)
[exec] at
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTy
peHandle type)
[exec] at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[exec] at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
[exec] at System.Activator.CreateInstance(Type type, BindingFlags
bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
[exec] at System.Activator.CreateInstance(String assemblyName, String
typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder,
Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence
securityInfo, StackCrawlMark& stackMark)
[exec] at System.Activator.CreateInstance(String assemblyName, String
typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder,
Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence
securityInfo)
[exec] at System.AppDomain.CreateInstance(String assemblyName, String
typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder,
Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence
securityAttributes)
[exec] at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName,
String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes,
Evidence securityAttributes)
[exec] at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName,
String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes,
Evidence securityAttributes)
[exec] at NUnit.Util.TestDomain.MakeRemoteTestRunner(AppDomain runnerDomain)
[exec] at NUnit.Util.TestDomain.Load(TestPackage package)
[exec] at
NUnit.ConsoleRunner.ConsoleUi.MakeRunnerFromCommandLine(ConsoleOptions
options)
[exec] at NUnit.ConsoleRunner.ConsoleUi.Execute(ConsoleOptions options)
[exec] at NUnit.ConsoleRunner.Runner.Main(String[] args)


 

  _____  


Tony Nassar

 

Cell: (703) 994-0954



Blog:  <blocked::http://slideguitarist.blogspot.com/>
http://slideguitarist.blogspot.com/
Music:  <http://www.soundclick.com/thecompletists>
http://www.soundclick.com/thecompletists

 

"God love me, and I'm a hell of a fighter.." - Floyd Mayweather

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.