Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Could not load file or assembly"/ "or one of its dependencies. The module was expected to contain an assembly manifest."

I have a c# application which uses SharpSVN dll and NServicebus dll,it compile fine but when it is executing(in the time of initialize the bus) it throw the following error

Could not load file or assembly 'file:///C:\Repositories\Repo\hooks\SharpSvn-DB44-20-Win32.dll' or one of its dependencies. The module was expected to contain an assembly manifest.

How can I solve the above problem.

Thank in advance Susanta

like image 788
Susanta Samanta Avatar asked Feb 28 '23 20:02

Susanta Samanta


1 Answers

Exclude the sharpsvn dlls from the NServiceBus assemblyscanning by configuring NSB with a explicit list of assemblies toi scan:

Configure.With("List of your assemblies that contain messagehandlers")...

Make sure to include NServiceBus.core.dll in the list if you're using the Saga feature.

Hope this helps!

like image 138
Andreas Öhlund Avatar answered Apr 27 '23 16:04

Andreas Öhlund