Error trying to run C# SDK for Couchbase

February 20th, 2013 by admin Leave a reply »

If you are going through the tutorial on this page: Couchbase Tutorial and you get an error right off the bat trying to instantiate the CouchbaseClient with just a simple call like: var client = new CouchbaseClient(); then you probably have your app.config in the wrong order. Contrary to what they are saying on the couchbase site, refer to my config file below to get your stuff up and running correctly.

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/>
  </configSections>
  <couchbase>
    <servers bucket="default" bucketPassword="">
      <add uri="http://127.0.0.1:8091/pools"/>
    </servers>
  </couchbase>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
  </startup>
</configuration>

The big gotcha is the where I had the runtime line placed, if I had it at the top, it would throw the error, but if you have it as I am showing here, it seems to work fine.

Advertisement

Leave a Reply