Closed JSCProjects closed 6 years ago
Can you share your message definitions?
Would it be possible to strip the code down to a simple repro that you could share with us? (Since you're on v6.4 you can switch to the learning transport)
Is it possible to sent this private?
Got the repro, will report back here with my findings
Can't see anything wrong with the drop-in assembly, I suspect that there is some references that is causing issues.
Unfortunately the NSB host makes troubleshooting asm scanning issues a bit hard but can you do the following:
Specify the endpoint config type explicitly in NServiceBus.Host.exe.config to make sure that the host it self doesn't excludes any asms - https://docs.particular.net/nservicebus/hosting/nservicebus-host/?version=host_8#endpoint-configuration-assembly-scanning
Add the below code in the ctor
or your class implementing IConfigureThisEndpoint
var firstChanceLog = LogManager.GetLogger("FirstChanceException");
var unhandledLog = LogManager.GetLogger("UnhandledException");
var domain = AppDomain.CurrentDomain;
domain.FirstChanceException += (o, ea) => { firstChanceLog.Debug(ea.Exception.Message, ea.Exception); };
domain.UnhandledException += (o, ea) =>
{
var exception = ea.ExceptionObject as Exception;
if (exception != null) unhandledLog.Error(exception.Message, exception);
};
Can you try that and start the endpoint with loglevel set to debug?
@JSCProjects did you get a chance to test the above?
Darn, missed that post. Sorry will try now
@andreasohlund Tried it but I can't find any clues
Ok, would it be possible to reduce this to a minimal runnable reproduction that I can try on my end?
@andreasohlund I mailed you a repro
Got it, will see if it repros on my end
Finally found it, if you want to (dynamic) load assemblies you need to load them with Assembly.LoadFrom(path) instead of Assembly.Load(byte[]). Also implement AppDomain.CurrentDomain.AssemblyResolve eventhandler to load deeper references.
@andreasohlund & @dvdstelt thanx for your help
Finally found it, if you want to (dynamic) load assemblies you need to load them with Assembly.LoadFrom(path) instead of Assembly.Load(byte[])
Noting that v7 does use Assembly.LoadFrom
In case it helps anyone, I just had the same error message for an event class that had moved namespace. The publishing endpoint had the old code and the receiving endpoint had the new code, hence deserialization failed. Updating the publishing endpoint fixed it.
Hello,
I'm receiving the above error after I've moved some handlers to an dynamically loaded assembly(addin functionality) before the error came the same handler was directly referenced in host. Now I've disconnected this handler from host and let nservicebus load it from a subdirectory and used the AssemblyScanner ScanAssembliesInNestedDirectories = true; This issue looks a lot like #4567 Also note that the messages are using the DataBus!
Below is my endpointConfiguration.
I use the following nuget's