Search code examples
espernesper

Nesper engine always tries to load types from Nesper.dll first


Every time I try to add a new type to my nesper engine, I get the following exception thrown in the nesper engine.

Could not load type 'K2Common.Order' from assembly 'NEsper, Version=4.8.0.0, Culture=neutral, PublicKeyToken=null'.

The engine eats the exception and then finds the proper type in my assembly as it iterates over each loaded assembly.

Is there a way to prevent nesper from searchign for a type in the nesper.dll first?


Solution

  • In the end I resolved the problem by using the Qualified assembly name

    configuration.AddEventType("OrderEvent", typeof(Order).AssemblyQualifiedName);
    

    instead of the below:

    configuration.AddEventType("OrderEvent", typeof(Order).FullName);