1

これを参照として使用し、両方をインストールしました(nugetを使用)

Install-Package RavenDB.Client -Version 1.0.992

インストール-パッケージRavenDB-組み込み-バージョン1.0.919

公式リンクでは、 Install-Package RavenDB-Embeddedの使用を推奨しています。ただし、そのnugetコマンドは、エラーInstall-Package:Unable to find 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の名前空間は何ですか?

4

1 に答える 1

1

グーグルグループで周りを見回していくつかの実験をした後、私は解決策を得ました

使用する

Install-Package RavenDB.Embedded -Version 1.0.992

また、コンソールアプリケーションの場合:コンソールプロジェクト->プロパティ->を右クリックします。

ターゲットフレームワークを.NETFramework4に設定します(デフォルトの.NET Framework 4クライアントプロファイルではありません)。

于 2012-12-12T19:53:05.563 に答える