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:

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Couchbase\v4.0_1.2.6.0__05e9c6b5a9ec94c2

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"?>
<configuration>

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

  <couchbase>
    <servers bucket="default" bucketPassword="private">
      <add uri="http://127.0.0.1:8091/pools/default"/>
    </servers>
  </couchbase>

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

</configuration>

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?

Thanks,

Jeff