views:

466

answers:

1

I've got an IronPython script that configures log4net, then calls .NET code that uses log4net. log4net is properly configured, as I log a message to indicate that it is initialized. But when I try to use my .NET class, it reports "could not load file or assembly 'log4net, ...'.

Some useful facts:

  • log4net is not installed to the GAC
  • the .NET class is correct, I've called it from other .NET code
  • the log4net assembly being loaded in IPY is in the same folder as my .NET assembly.
  • filemon shows that all log4net.dll access is successfully resolved from the expected location
  • fuslogvw doesn't report any binding errors
  • I'm adding both the log4net reference and the .NET assembly references using AddReferenceToFileAndPath( )

What's strange is that the log4net assembly has already been loaded. It must be loading the .NET assembly in another AppDomain. If that's how it works, it would be helpful to know.

Any ideas out there? Thanks.

+2  A: 

I was able to solve the problem by using absolute reference paths rather than relative ones.

dpurrington