<legend id='2ASNF'><style id='2ASNF'><dir id='2ASNF'><q id='2ASNF'></q></dir></style></legend>

        <tfoot id='2ASNF'></tfoot>
        <i id='2ASNF'><tr id='2ASNF'><dt id='2ASNF'><q id='2ASNF'><span id='2ASNF'><b id='2ASNF'><form id='2ASNF'><ins id='2ASNF'></ins><ul id='2ASNF'></ul><sub id='2ASNF'></sub></form><legend id='2ASNF'></legend><bdo id='2ASNF'><pre id='2ASNF'><center id='2ASNF'></center></pre></bdo></b><th id='2ASNF'></th></span></q></dt></tr></i><div id='2ASNF'><tfoot id='2ASNF'></tfoot><dl id='2ASNF'><fieldset id='2ASNF'></fieldset></dl></div>

        <small id='2ASNF'></small><noframes id='2ASNF'>

          <bdo id='2ASNF'></bdo><ul id='2ASNF'></ul>
      1. “找不到事务存储类型"嵌入式 RavenDB 出错

        时间:2023-07-10
              • <bdo id='aRdzn'></bdo><ul id='aRdzn'></ul>

                <legend id='aRdzn'><style id='aRdzn'><dir id='aRdzn'><q id='aRdzn'></q></dir></style></legend><tfoot id='aRdzn'></tfoot>

                  <tbody id='aRdzn'></tbody>
                <i id='aRdzn'><tr id='aRdzn'><dt id='aRdzn'><q id='aRdzn'><span id='aRdzn'><b id='aRdzn'><form id='aRdzn'><ins id='aRdzn'></ins><ul id='aRdzn'></ul><sub id='aRdzn'></sub></form><legend id='aRdzn'></legend><bdo id='aRdzn'><pre id='aRdzn'><center id='aRdzn'></center></pre></bdo></b><th id='aRdzn'></th></span></q></dt></tr></i><div id='aRdzn'><tfoot id='aRdzn'></tfoot><dl id='aRdzn'><fieldset id='aRdzn'></fieldset></dl></div>

                <small id='aRdzn'></small><noframes id='aRdzn'>

                  本文介绍了“找不到事务存储类型"嵌入式 RavenDB 出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我能够根据以下位置的代码成功运行 RavenDB 的简单测试:http:///ravendb.net/tutorials/hello-world

                  接下来我尝试以嵌入式方式运行它,但我不断收到以下错误:

                  消息:找不到事务存储类型:Raven.Storage.Esent.TransactionalStorage、Raven.Storage.EsentStackTrace:在 c:Builds
                  avenRaven.DatabaseConfigInMemoryRavenConfiguration.cs:line 272 中的 Raven.Database.Config.InMemoryRavenConfiguration.CreateTransactionalStorage(Action notifyAboutWork)在 c:Builds
                  avenRaven.DatabaseDocumentDatabase.cs:line 109 中的 Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration 配置)在 c:Builds
                  avenRaven.Client.EmbeddedEmbeddableDocumentStore.cs:line 130 中的 Raven.Client.Client.EmbeddableDocumentStore.InitializeInternal()在 c:Builds
                  avenRaven.Client.LightweightDocumentDocumentStore.cs:line 388 中的 Raven.Client.Document.DocumentStore.Initialize()在 C:UsersPranavDocumentsProjectsRepositories-CloneCommon-cloneTestsRavenDB.cs:line 114 中的 Tests.RavenEmbedded.RavenDB..ctor()在 C:UsersPranavDocumentsProjectsRepositories-CloneCommon-cloneTestsRavenDB.cs:line 170 中的 Tests.TestRavenDB.Basics()

                  <小时>

                  设置:

                  目标框架是.NET Framework 4

                  我在我的项目中添加了以下引用:

                  1. RavenDB-Build-309EmbeddedClientRaven.Client.Embedded.dll
                  2. RavenDB-Build-309ClientRaven.Client.Lightweight.dll
                  3. RavenDB-Build-309EmbeddedClientRaven.Storage.Esent.dll
                  4. RavenDB-Build-309EmbeddedClientRaven.Storage.Managed.dll

                  <小时>

                  代码为:

                  <上一页>命名空间 Tests.RavenEmbedded{使用 Raven.Client.Client;使用 Raven.Client.Document;使用 Raven.Storage.Esent;使用 Raven.Storage.Managed;使用 Tests.RavenData;RavenDB 类{公共 RavenDB(){//EmbeddableDocumentStore store = new EmbeddableDocumentStore { DataDirectory = @"C:TempRavenData" };//Raven.Storage.Esent.TransactionalStoragevar store = new EmbeddableDocumentStore { DataDirectory = @"C:TempRavenData" };商店.初始化();#region 写入数据使用 (var session = store.OpenSession()){var 产品 = 新产品{成本 = 3.99m,名称=牛奶",};session.Store(产品);session.SaveChanges();session.Store(新订单{客户=客户/ayende",订单行 ={新订单行{产品 ID = 产品 ID,数量 = 3},}});session.SaveChanges();}#endregion#region 读取数据使用 (var session = store.OpenSession()){var order = session.Load("orders/1");Debug.Print("客户:{0}", order.Customer);foreach (var orderLine in order.OrderLines){Debug.Print("Product: {0} x {1}", orderLine.ProductId, orderLine.Quantity);}session.SaveChanges();}#endregion}}}命名空间测试{公共类 TestRavenDB{公共静态无效基础(){尝试{//var db = new RavenClientServer.RavenDB();var db = new RavenEmbedded.RavenDB();}捕捉(例外前){Debug.Print("消息:{0}",ex.Message);Debug.Print("StackTrace: {0} ",ex.StackTrace);}}}}

                  我已经尝试搜索了几天,也尝试了一些不同的变体.我不确定发生了什么.

                  解决方案

                  感谢 groups.google.com/group/ravendb/topics 上的 Ayende Rahien.

                  解决方案是将Raven.Storage.Esent"引用添加到主项目.这是 Visual Studio 和间接引用的问题.

                  感谢@Derek 建议我在那里发帖.

                  -- 普拉纳夫

                  I was able to successfully run a simple test for RavenDB based on the code found at: http://ravendb.net/tutorials/hello-world

                  Next I tried to run it in an Embedded Manner, but I keep on getting the following error:

                  Message: Could not find transactional storage type: Raven.Storage.Esent.TransactionalStorage, Raven.Storage.Esent  
                  StackTrace:    at Raven.Database.Config.InMemoryRavenConfiguration.CreateTransactionalStorage(Action notifyAboutWork) in c:Builds
                  avenRaven.DatabaseConfigInMemoryRavenConfiguration.cs:line 272
                     at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration) in c:Builds
                  avenRaven.DatabaseDocumentDatabase.cs:line 109
                     at Raven.Client.Client.EmbeddableDocumentStore.InitializeInternal() in c:Builds
                  avenRaven.Client.EmbeddedEmbeddableDocumentStore.cs:line 130
                     at Raven.Client.Document.DocumentStore.Initialize() in c:Builds
                  avenRaven.Client.LightweightDocumentDocumentStore.cs:line 388
                     at Tests.RavenEmbedded.RavenDB..ctor() in C:UsersPranavDocumentsProjectsRepositories-CloneCommon-cloneTestsRavenDB.cs:line 114
                     at Tests.TestRavenDB.Basics() in C:UsersPranavDocumentsProjectsRepositories-CloneCommon-cloneTestsRavenDB.cs:line 170 
                  


                  Setup:

                  Target framework is .NET Framework 4

                  I added the following References to my project:

                  1. RavenDB-Build-309EmbeddedClientRaven.Client.Embedded.dll
                  2. RavenDB-Build-309ClientRaven.Client.Lightweight.dll
                  3. RavenDB-Build-309EmbeddedClientRaven.Storage.Esent.dll
                  4. RavenDB-Build-309EmbeddedClientRaven.Storage.Managed.dll


                  The code is:

                  namespace Tests.RavenEmbedded
                  {
                      using Raven.Client.Client;
                      using Raven.Client.Document;
                      using Raven.Storage.Esent;
                      using Raven.Storage.Managed;
                      using Tests.RavenData;
                  
                      class RavenDB
                      {
                          public RavenDB()
                          {
                              // EmbeddableDocumentStore store = new EmbeddableDocumentStore { DataDirectory = @"C:TempRavenData" };
                              //Raven.Storage.Esent.TransactionalStorage
                              var store = new EmbeddableDocumentStore  { DataDirectory = @"C:TempRavenData" };
                              store.Initialize();
                  
                              #region Write Data
                              using (var session = store.OpenSession())
                              {
                                  var product = new Product
                                  {
                                      Cost = 3.99m,
                                      Name = "Milk",
                                  };
                                  session.Store(product);
                                  session.SaveChanges();
                  
                                  session.Store(new Order
                                  {
                                      Customer = "customers/ayende",
                                      OrderLines =
                                        {
                                            new OrderLine
                                            {
                                                ProductId = product.Id,
                                                Quantity = 3
                                            },
                                        }
                                  });
                                  session.SaveChanges();
                              }
                              #endregion
                  
                              #region Read Data
                              using (var session = store.OpenSession())
                              {
                                  var order = session.Load("orders/1");
                                  Debug.Print("Customer: {0}", order.Customer);
                                  foreach (var orderLine in order.OrderLines)
                                  {
                                      Debug.Print("Product: {0} x {1}", orderLine.ProductId, orderLine.Quantity);
                                  }
                                  session.SaveChanges();
                              }
                  
                              #endregion
                  
                          }
                      }
                  }
                  
                  namespace Tests
                  {
                      public class TestRavenDB
                      {
                          public static void Basics()
                          {
                              try
                              {
                                  //var db = new RavenClientServer.RavenDB();
                                  var db = new RavenEmbedded.RavenDB();
                              }
                              catch (Exception ex)
                              {
                  
                                  Debug.Print("Message: {0} ",ex.Message);
                                  Debug.Print("StackTrace: {0} ",ex.StackTrace);
                  
                              }
                          }
                  
                      }
                  }
                  

                  I have tried searching for this for a few days and tried a few different variations too. I am not sure what's going on.

                  解决方案

                  Thanks to Ayende Rahien on groups.google.com/group/ravendb/topics.

                  The solution was to add "Raven.Storage.Esent" reference to the main project. It's an issue with Visual Studio and indirect references.

                  Thanks @Derek for suggesting that I post there.

                  -- Pranav

                  这篇关于“找不到事务存储类型"嵌入式 RavenDB 出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:推荐一个好的db4o viewer 下一篇:每个 DocumentStore 的 WaitForNonStaleResults

                  相关文章

                1. <small id='KfOXP'></small><noframes id='KfOXP'>

                  <tfoot id='KfOXP'></tfoot>

                  <legend id='KfOXP'><style id='KfOXP'><dir id='KfOXP'><q id='KfOXP'></q></dir></style></legend>
                  <i id='KfOXP'><tr id='KfOXP'><dt id='KfOXP'><q id='KfOXP'><span id='KfOXP'><b id='KfOXP'><form id='KfOXP'><ins id='KfOXP'></ins><ul id='KfOXP'></ul><sub id='KfOXP'></sub></form><legend id='KfOXP'></legend><bdo id='KfOXP'><pre id='KfOXP'><center id='KfOXP'></center></pre></bdo></b><th id='KfOXP'></th></span></q></dt></tr></i><div id='KfOXP'><tfoot id='KfOXP'></tfoot><dl id='KfOXP'><fieldset id='KfOXP'></fieldset></dl></div>

                      • <bdo id='KfOXP'></bdo><ul id='KfOXP'></ul>