While testing a custom adapter for Neuron ESB I encountered this error:
System.TypeLoadException: Could not load type 'Neuron.Esb.Adapters.AdapterEncodingTypeConverter' from assembly 'Neuron.Esb.Adapters.FlatFileAdapter, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null'.
This seemed pretty odd because namespace and name were correct, at least in the DLL stored under:
C:\Program Files\Neudesic\Neuron ESB v3\DEFAULT\Adapters\
Using Process Monitor I discovered that I had mistakenly copied an earlier version of Neuron.Esb.Adapters.FlatFileAdapter.dll to:
C:\Program Files\Neudesic\Neuron ESB v3\DEFAULT\
(This version actually didn’t have the type/class needed, but Neuron Explorer seemed to prefer using it…)
The problem was resolved by:
1. Shutting down NeuronExplorer.exe and ESBService.exe (because they lock assemblies in use while running)
2. Removing the old and unwanted DLL.
3. Starting ESBService.exe and NeuronExplorer.exe
Avoid storing multiple versions of custom adapters in Neuron ESB’s search path to avoid potential problems like this.