1

I am using the SliM runner for FitNesse testing of our .Net 4.0 project. Everything was going smoothly until we added the Enterprise Library logger. We are configuring the Unity container for the logger from configuration. When the configuration is loaded, the test fails, complaining that it cannot load the EntLib dlls. Even when the classpath entries of the suite are added to include the Microsoft.Practices.EnterpriseLibrary.Logging.dll and Microsoft.Practices.EnterpriseLibrary.Common.dll from where the project is being built it still fails. However, it does find them if they are added to the same directory where Runner.exe exists.

That would be ok, hardly desirable but sufficient except that the logger uses a custom listener type, which is back in the project under test. That custom type, in turn relies on our own libraries and extensions. Fitnesse complains that it cannot find the dll with the custom listener, as well as its dependencies, unless they are all in the same directory as Runner.exe. However, if I just remove the reliance on Enterprise Library, the test runner finds all the assemblies fine in the build directory.

Mike Stockdale
  • 5,256
  • 3
  • 29
  • 33
Ben Rice
  • 85
  • 7

1 Answers1

0

I've had problems with some libraries that insist on looking for DLLs in the same directory where the application executable is, in this case, runner.exe. Even when the dlls are explicitly loaded, it still won't recognize them. I haven't tried the combination of Unity and Enterprise Library but this may be a similar issue.

Copying runner.exe into the build directory and running from there may be a workaround.

You can also try AppDomain settings: See AppDomainSetup in http://fitsharp.github.com/FitSharp/SuiteConfigurationFile.html

Mike Stockdale
  • 5,256
  • 3
  • 29
  • 33