2012-12-12 81 views
1

我用this作爲參考和安裝在兩個(使用的NuGet)麻煩嵌入模式設置RavenDB

安裝-封裝RavenDB.Client -Version 1.0.992

AND

安裝-包RavenDB-嵌入式-Version 1.0.919

(該鏈接official建議使用安裝,包裝RavenDB - 嵌入式,但是這的NuGet命令失敗,出現錯誤在廄包:無法找到包 'RavenDB-嵌入式')

但代碼

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Raven.Client.Document; 

namespace ConsoleApplication4 
{ 
    class Program 
    { 
     static void Main(string[] args) 
     { 
      var Store = new DocumentStore { ConnectionStringName = "RavenDB" }; 
      var instance = new EmbeddableDocumentStore { ConnectionStringName = "RavenDB" }; 
     } 
    } 
} 

不承認EmbeddableDocumentStore。 EmbeddableDocumentStore的命名空間是什麼?

回答

1

在谷歌團體和一些實驗環顧四周後,我得到了解決

使用

Install-Package RavenDB.Embedded -Version 1.0.992 

此外,如果它是一個控制檯應用程序:右鍵點擊控制檯項目 - >屬性 - >

將目標框架設置爲.NET Framework4(而不是默認的.NET Framework 4客戶端配置文件