2

The error:

Could not load file or assembly 'Enyim.Caching, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cec98615db04012e' or one of its dependencies

This is on server 2008, I tried disabling the strong name validation, but the instructions are totally wrong for server, and I dont' really trust this anyhow, how will I get it to work on the prod server.

Wild frustrating..

The server is up and happily running, but I can't get any memcache client to actually work..

I assume someone, somewhere has managed to make this work...

cuongle
  • 74,024
  • 28
  • 151
  • 206
Monsters X
  • 2,638
  • 1
  • 19
  • 21
  • How are you referencing the Enyim.Caching assembly in your current code / project.. ? did you add a reference..? also if you did add a reference.. then make sure that copy local = true for the properties. one other thing what version of .NET are you trying to run this.. VS2010, 2008 2.0 ,3.5 or 4.0 Framework..???? – MethodMan Jan 23 '12 at 19:04
  • Hi , visual studio 2010, copy local = true. I just did a fresh build following these http://www.couchbase.com/develop/net/current , same result. I've seen this mentioned re: turning off strong name, but that seems like madness.... I used nuget this time to get the dll's , no change. – Monsters X Jan 23 '12 at 19:25

1 Answers1

2

Enyim.Caching.dll, which is a dependency of Couchbase.dll, is delay signed. So if you're running from Visual Studio, you'll need to disable assembly validation for this assembly. If you open up the Visual Studio Command Prompt and type the following, you should no longer see the error:

sn -Vr *,cec98615db04012e

Please let me know if this fix doesn't work for you. Also, be sure to run the this command in Administrator mode or sn.exe will fail since it needs to update the registry with the exception.

-- John

John Zablocki
  • 1,592
  • 9
  • 6
  • Ah, ok, running this via the cs command prompt, as administrator is the missing piece. I can run it now, so that's grand... – Monsters X Jan 23 '12 at 19:54
  • 2
    I just uploaded a quick update to the CouchbaseNetClient Nuget package (1.0.1) to resolve the delayed signing issue. My apologies for the confusion. With the Nuget package you won't need to change anything on the server. I'll also get a fix to the download on Couchbase.com. If you want to work with the source and deploy from your own build, you could simply change the project settings for Enyim.Caching to use your own strong name key or disable signing. Note that the Enyim.Caching VS proj uses an MSBuild file in the builds dir (CommonProperties.targets) where signing rules are defined. – John Zablocki Jan 23 '12 at 20:42
  • Great, i got it, and it fired up like a champ... so why did you have delayed signing? I've not encountered that before, and seems like more hassle than help.. Thanks for all your help here! – Monsters X Jan 23 '12 at 20:50
  • I'm not 100% sure as to the motivation for delay signing. I think it is as simple as not distributing the private key. But since I'm only a consumer of that project, I can't speculate beyond that. Glad it's working. If you have any feedback, let us know at http://www.couchbase.com/forums/sdks/sdks. – John Zablocki Jan 23 '12 at 21:47
  • off topic here, but how do we configure logging for the new couchbase (vs. enyim.caching) client? mine is starting to fail after a while and i can't figure out why. – Monsters X Jan 24 '12 at 20:38