NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

Assembly loaded from a different location

Open hugovlc opened this issue 8 years ago • 3 comments

I am using Nservicebus 6.4.3 and on windows 10 and I get this error when trying to start the instance:

IEndpointInstance endpointInstance = Endpoint.Start(endpointConfiguration).GetAwaiter().GetResult();

API restriction: The assembly 'file:///C:\devnet\eCdt\sprints\dev-4.0\CdT.UI.Ecdt\CdT.UI.Ecdt.Web\bin\Oracle.ManagedDataAccess.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.

I saw that there was a fix for a similar issue for the version 6.4.2. On a windows 7 machine it works fine.

hugovlc avatar Jun 05 '18 12:06 hugovlc

@hugovlc Take a look at the GAC on both of those machines. I suspect the problem you're running into is that Oracle.ManagedDataAccess.dll is in the GAC on the machine that is having the problem, and it's not in the GAC on the machine that is working fine.

If that is the case, then you either need to remove it from the GAC, stop deploying the local copy to the bin folder, or exclude the assembly from scanning.

bording avatar Jun 05 '18 16:06 bording

@bording That is exactly it. Thank you.

hugovlc avatar Jun 12 '18 07:06 hugovlc

Glad to hear that fixed it for you!

bording avatar Jun 12 '18 14:06 bording