Description
Marking at this as blocker because it is extremely frustrating that a new user cannot simple copy, paste and run the hello world example.
using Couchbase.Core; |
using Couchbase.Core.Buckets; |
|
internal class Program |
{
|
private static readonly Cluster Cluster = new Cluster(); |
|
private static void Main(string[] args) |
{
|
using (var bucket = Cluster.OpenBucket()) |
{
|
var document = new Document<dynamic> |
{
|
Id = "Hello", |
Content = new |
{
|
name = "Couchbase" |
}
|
};
|
|
var upsert = bucket.Upsert(document); |
if (upsert.Success) |
{
|
var get = bucket.GetDocument<dynamic>(document.Id); |
document = get.Document; |
var msg = string.Format("{0} {1}!", document.Id, document.Content.name); |
Console.WriteLine(msg);
|
}
|
Console.Read();
|
}
|
}
|
}
|
Error message when you try and build:
Error 1 The type or namespace name 'Cluster' could not be found (are you missing a using directive or an assembly reference?) c:\users\dave\documents\visual studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs 12 29 ConsoleApplication1
|