There is probably a better place to put this (i.e. an issue tracker), but I can’t find it, if there is, so forgive me if this doesn’t belong here:
Using the .NET client to create a bucket programmatically (CouchbaseCluster.CreateBucket), works fine as long as at least one bucket already exists in the cluster. If the cluster has 0 buckets, the getBucketUri method in CouchbaseCluster.cs returns null. This then results in an ArgumentNullException in HttpHelper.doRequest.
The workaround is to create at least one bucket that you intend to use, during installation, or to create a dummy bucket with minimal footprint, and remove it after scaffolding buckets programmatically. In a dev environment, this keeps developers from tearing down and re-scaffolding their Couchbase buckets programmatically.
BTW - I experienced this using Couchbase 2.1 and the .NET client 1.2.