Could not load file or assembly 'Enyim.Caching' or one of its dependencies.
I've got a wcf service and have an issue with the c# client. It only occurs when i'm using di/ioc (i'm using StructureMap) basically I cannot read or write to the couchbase server instance. However if I 'new' it, it seems to work so i've downloaded the source to step through and find more info. I'm getting this error:
Could not load file or assembly 'Enyim.Caching' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
I thought it might be related to this post on stackoverflow however i'm not using the nuget package.
I've disabled signing in the project settings however I'm getting no joy.
Any ideas?
Thanks
Sean
The latest builds of Couchbase.dll include a forked version of Enyim.Caching. I'm planning to remove the signing pieces from that project at some point. In the meantime, checkout the script I use to prep Enyim for running in Visual Studio. You don't have to mess with sn.exe. Basically, you just have to modify an MSBuild file referenced by the main project file to remove the signing properties - that's why it keeps coming back.
https://github.com/couchbase/couchbase-net-client/blob/master/enyim-dev-...
I have the same issue... and in that post the answer seems to be a registry change via the sn tool, to disable validation. And, a good-but-ignored follow-up comment asked how that's supposed to work in production which I'm also curious about.
So, I know the sn trick didn't work for you, but even if it did... I presume no one would want this to be part of their deployment process. So, I'm interested in what the real fix is.