1
Vote

Getting FileNotFoundException when calling Ruby.CreateEngine() and the IronRuby DLLs are not located in the base directory.

description

I'm using MEF to get a modular application and compose it at runtime.
I have a Library that is referencing the IronRuby DLLs and that initializes the IronRuby context.
I put all my module DLLs (and its depending DLLs, like IronRuby*.dlls) into a separate "Modules" folder. The executing Assembly is at the same directory level as the Modules folder (but not "knowing" from the module DLLs until compisition).
 
When the Ruby engine gets created it doesn't find the IronRuby.dll and I get a FileNotFoundException. It has something to do with the location of my DLL in the subdirectory, because when I copy the IronRuby*.dlls to the directory where the exe is located everything works, but I want the (for the Application not relevant) DLLs reside in the Modules directory.
(The IronPython code works btw.)
 
My code is on github so feel free to test it out: https://github.com/toburger/RulesEngine

comments

tobias wrote May 8, 2012 at 7:15 AM

Problem solved. I had an old IronPython assembly in the GAC which was causing the problem. After uninstalling the old version everything worked perfectly.