This project has moved. For the latest updates, please go here.

Unable to find an entrypoint...

Aug 23, 2016 at 3:55 PM
Is this project compatible with Windows 10? I have worked with this back on the windows 7 days without issue but now that I am on windows 10 I am getting the following error. Am I missing something? I created a new project did a nuget reference of the managed esent package
package id="ManagedEsent" version="1.9.4" targetFramework="net461" and attempted to create an instance. I am receiving the error below.
 using (var instance = new Instance("createdatabasetest"))
 {}
Result StackTrace:
at Microsoft.Isam.Esent.Interop.Implementation.NativeMethods.JetCreateInstance(IntPtr& instance, String szInstanceName)
at Microsoft.Isam.Esent.Interop.Implementation.JetApi.JetCreateInstance(JET_INSTANCE& instance, String name) in c:\codeplex\EsentInterop\JetApi.cs:line 124
at Microsoft.Isam.Esent.Interop.Implementation.JetApi.GetVersionFromEsent() in c:\codeplex\EsentInterop\Esent\EsentJetApi.cs:line 124
at Microsoft.Isam.Esent.Interop.Implementation.JetApi.DetermineCapabilities() in c:\codeplex\EsentInterop\Esent\EsentJetApi.cs:line 53
at Microsoft.Isam.Esent.Interop.Implementation.JetApi..ctor() in c:\codeplex\EsentInterop\JetApi.cs:line 95
at Microsoft.Isam.Esent.Interop.Api..cctor() in c:\codeplex\EsentInterop\Api.cs:line 69
--- End of inner exception stack trace ---
at Microsoft.Isam.Esent.Interop.Api.JetCreateInstance2(JET_INSTANCE& instance, String name, String displayName, CreateInstanceGrbit grbit)
at Microsoft.Isam.Esent.Interop.Instance..ctor(String name, String displayName, TermGrbit termGrbit) in c:\codeplex\EsentInterop\Instance.cs:line 117
at Microsoft.Isam.Esent.Interop.Instance..ctor(String name) in c:\codeplex\EsentInterop\Instance.cs:line 53
at EsentTests.TestHelper.CreateDatabase(String storeName, String path) in C:\Dev\Git\Repos\Akka.Persistence.Esent\Esent.Tests\TestHelper.cs:line 43
at EsentTests.TestHelper.CreateDatabase(String storeName) in C:\Dev\Git\Repos\Akka.Persistence.Esent\Esent.Tests\TestHelper.cs:line 24
at Esent.Tests.EsentCreation.DoesStoreExistReturnsFalse() in C:\Dev\Git\Repos\Akka.Persistence.Esent\Esent.Tests\EsentCreation.cs:line 16
Result Message:
Test method Esent.Tests.EsentCreation.DoesStoreExistReturnsFalse threw exception:
System.TypeInitializationException: The type initializer for 'Microsoft.Isam.Esent.Interop.Api' threw an exception. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'JetCreateInstance' in DLL 'esent.dll'.
Coordinator
Aug 23, 2016 at 5:01 PM
I am using this project on Windows 10 successfully. I just updated my test application to target .Net 4.6.1 but still am not facing any issues.

What version of Windows 10 are you running? Any chance you can take a dump at this point and put it on OneDrive (or something like that)? I'd be happy to take a look for you.

~ Michael
Aug 25, 2016 at 2:25 PM
Thanks for the help. I went back to the start and re-created my project as an empty project with just the 1 line to create an instance and got it to work. I continued recreating the project 1 step at a time to see if I can isolate what it was that caused it, but so far I am back to where I was and it is now working. So its good it's working, but bad I did not know what broke it before.
Anyway thanks for the reassurance that it does work.
Noel
Developer
Aug 25, 2016 at 4:16 PM
That sounds peculiar.
The 32-bit and 64-bit DLLs should both have the same exports, so that's not likely to be a problem.
esent.interop.dll doesn't always look for the esent.dll in system32. If there is an esent.dll in your local directory it could pick that one up instead. Or some other random one on the path. Maybe your old project had a rogue copy of the DLL?
I'm just guessing though. It's rather curious.

-martin
Coordinator
Aug 25, 2016 at 4:39 PM
That was my theory too. I was hoping a dump could confirm where esent.dll was getting loaded from as that's the only thing that comes to mind that could cause an issue like this. Nanderto - if you run into this again, please check where esent.dll is getting loaded from or take a dump and let me know so I can dig into it.

~ Michael