Throw Method not found Excetpion: 'Void Microsoft.Isam.Esent.Interop.Api.JetBeginTransaction2

Aug 30, 2010 at 8:36 AM

Hello.

I insert a struct value  into PersistentDictionary ,then get this value. throw  Method not found Excetpion: 'Void Microsoft.Isam.Esent.Interop.Api.JetBeginTransaction2.

The following is my code:

            var _MessageQueue = new PersistentDictionary<Guid, Message>("messageHost");
            Message msg = new Message();
            msg.Id = Guid.NewGuid();
            msg.EnQueueTime = System.DateTime.Now;
            msg.Header="Hello";
            //MsgBody body = new MsgBody();
            //body.MsgText = "Hello World";
            msg.Body= "HelloWOrld";
            _MessageQueue.Add(msg.Id.Value,msg);            
            Message a = _MessageQueue[msg.Id.Value];

while try get the message ,throw a excetpion like this :

   at Microsoft.Isam.Esent.Collections.Generic.ReadOnlyTransaction..ctor(JET_SESID sesid)
   at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionaryCursor`2.BeginReadOnlyTransaction() in D:\Study\Architect\ManagedEsent\ManagedEsent-54512\EsentCollections\PersistentDictionaryCursor.cs:line 138
   at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionary`2.get_Item(TKey key) in D:\Study\Architect\ManagedEsent\ManagedEsent-54512\EsentCollections\PersistentDictionary.cs:line 313
   at EsentDemo.Program.Main(String[] args) in D:\Study\Architect\ManagedEsent\Demo\EsentDemo\Program.cs:line 25
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()           

Aug 30, 2010 at 7:03 PM

It looks like you are using the latest source code. That isn't a problem, but you have to make sure you use the Esent.Interop.dll built from those sources as well as the collections DLL.