The type initializer for 'Couchbase.CouchbaseClient' threw an exception

I’m trying to create CouchbaseClient instance but i’m getting this error:

The type initializer for 'Couchbase.CouchbaseClient' threw an exception

Everything has worked just fine before I put Couchbase dll in:


And Enyim.Caching.dll in the old .NET 2.0 GAC.

Couchbase Console shows that the database is up and running.

Here is my app.config of the client tester:

<?xml version="1.0"?>

    <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/>

    <servers bucket="default" bucketPassword="private">
      <add uri=""/>

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>


What can I do in order to make this thing work ?

ohadinho -

Please help me understand the problem you are having; are you saying that your project worked until you added the Couchbase.dll and Enyim.Caching.dll to the GAC?

Do you have a requirement for GAC deployment?If you can avoid the GAC, I would!

Also, can you look deeper into the stacktrace and find where and what is causing the type initializer error?