无法在嵌入模式下设置RavenDB

时间:2012-12-12 18:51:05

标签: ravendb

我使用this作为参考并安装了两者(使用nuget)

安装包RavenDB.Client -Version 1.0.992

安装包RavenDB-Embedded -Version 1.0.919

official链接建议使用安装包RavenDB-Embedded 。但是这个nuget命令失败并显示错误Install-Package:无法找到包'RavenDB-Embedded'。)

但代码

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 个答案:

答案 0 :(得分:1)

在浏览谷歌小组并进行一些实验后,我得到了解决方案

使用

Install-Package RavenDB.Embedded -Version 1.0.992

此外,如果它是一个控制台应用程序:右键单击控制台项目 - >属性 - >

将Target框架设置为.NET Framework4(而不是默认的.NET Framework 4 Client Profile

相关问题